This function is similar to R function neImpute from the mmedflex package.

ds.neImpute(object = NULL, nMed = 1, newobj = NULL, datasources = NULL)

Arguments

object

a string character, the name of an object used to select a method.

nMed

an integer, the number of mediators to be considered jointly. For example, if nMed = 2, not only the second predictor variable, but the two predictor variables declared after the exposure variable are internally coded as mediators. Correct specification of the (number of) mediators can easily be checked in the summary output of the natural effect model object (returned by ds.neModel function), which lists the names of the exposure and all mediators. Default value of nMed is set to 1.

newobj

a character string that provides the name for the output object that is stored on the data servers. Default neImpute.data.

datasources

a list of DSConnection-class objects obtained after login. If the datasources argument is not specified the default set of connections will be used: see datashield.connections_default.

Value

a data frame of class c("data.frame", "expData", "impData") is assigned at the server-side of each study.

Details

The function ds.neImpute both expands the data along hypothetical exposure values and imputes nested counterfactual outcomes.

Author

Demetris Avraam, for DataSHIELD Development Team