| SimulateData | R Documentation |
SimulateData creates simulation data set using specified
input parameters. Output list is dat argument for fitting
path coefficients and direct and indirect effects.
SimulateData(params)
params |
Simulation parameters (see SimpleSim for format) |
Output list used as dat argument for ComputePath
and ComputEffectxx. Has named elements:
y : response vector of length n, either double or Surv object
mm : n x q mediator matrix
xx : n x p treamtment matrix
co : n x r matrix of confounders
path : p x q matrix of 0s and 1s denoting paths to be fit.
path[i,j]=0 indicates a priori
knowledge of no path xx[i] and mm[j]
family : 'gaussian', 'binomial', or 'cox' indicating
whether a linear, logistic, or cox model
should be fit with the y on xx,mm,co regression
List containing simulation data.
set.seed(1234)
params <- SimpleSim()
dat <- SimulateData(params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.