dataGenerationFn: A dataset simulation function

Description Usage Arguments Value

Description

dataGenerationFn generates an example dataset under a model that contains a main effect component, a treatment-by-covariates interaction effect component, and a random noise component.

Usage

1
2
3
dataGenerationFn(n = 200, p = 50, w = 1, delta = 1,
  true.alpha = NULL, true.eta = NULL, sigma = 0.4,
  correlationX = 0, sigmaX = 1, sim.seed = NULL, obs = FALSE)

Arguments

n

sample size.

p

dimension of the pretreatment covariates.

w

controls the nonliarity of the treatment-specific link function that defines the interaction effect component.

w=1

linear

w=2

almost linear

w=3

highly nonlinear

delta

controls the intensity of the main effect.

delta=1

moderate main effect

delta=2

big main effect

true.alpha

a vector of the true single index coefficients (associated with the interaction effect component); if NULL, then true.alpha is set to be (1, 0.5, 0.25, 0.125, 0,...0)' (only the first 4 elements are nonzero).

true.eta

a vector of the true main effect coefficients; if NULL, then true.eta is randomly generated in a way that only the first 10 elements are nonzero.

sigma

standard deviation of the random noise term.

correlationX

correlation among the pretreatment covariates.

sigmaX

standard deviation of the pretreatment covariates.

sim.seed

a seed number for random data generation

obs

if TRUE, use an observational study setting (X and Tr are correlated)

Value

y

a n x 1 vector of treatment outcomes.

Tr

a n x 1 vector of treatment indicators.

X

a n x p matrix of pretreatment covariates.

SNR

the "signal" (interaction effects) to "nuisance" (main effects + noise) variance ratio (SNR) of the dataset.

true.alpha

the true single index coefficients.

true.eta

the true main effect coefficients.

optTr

a n x 1 vector of treatments indicating the optimal treatment selections.

value.opt

the "Value" of the optimal treatment selection rule, optTr.


syhyunpark/csim documentation built on May 31, 2019, 4:56 a.m.