Learn R Programming

mads (version 0.1.6)

resample.covariates: Parametrically resamples selected variables in the dataset.

Description

Parametrically resamples specified variables in the dataset based on a measure of uncertainty and a sampling distribution supplied by the user.

Usage

resample.covariates(ddf.dat.working, covariate.uncertainty, MAE.warnings)

Arguments

ddf.dat.working

a list of datasets to be used in the analyses

covariate.uncertainty

a dataframe detailing the variables to be resampled - variable.layer, variable.name, cor.factor.layer, cor.factor.name , uncertainty.layer, uncertainty.name, uncertainty.measure, sampling.distribution.

MAE.warnings

character vector of warning messages

Value

list of dataframes containing the parametrically resampled data

Details

This function may also apply a correction factor. If numeric is specified the same value will be applied to all observations. If a data layer is specified then this function looks for a variable name in the specified layer of the dataset and applies this as a correction factor.