generate.data {simml} | R Documentation |
A data generation function
Description
generate.data
generates an example dataset from a mean model that has a "main" effect component and a treatment-by-covariates interaction effect component (and a random component for noise).
Usage
generate.data(n = 200, p = 10, family = "gaussian",
correlationX = 0, sigmaX = 1, sigma = 0.4, s = 2, delta = 1,
pi.1 = 0.5, true.beta = NULL, true.eta = NULL)
Arguments
n |
sample size. |
p |
dimension of covariates. |
family |
specifies the distribution of the outcome y; "gaussian", "binomial", "poisson"; the defult is "gaussian" |
correlationX |
correlation among the covariates. |
sigmaX |
standard deviation of the covariates. |
sigma |
standard deviation of the random noise term (for gaussian response). |
s |
controls the nonliarity of the treatment-specific link functions that define the interaction effect component.
|
delta |
controls the intensity of the main effect; can take any intermediate value, e.g.,
|
pi.1 |
probability of being assigned to the treatment 1 |
true.beta |
a p-by-1 vector of the true single-index coefficients (associated with the interaction effect component); if |
true.eta |
a p-by-1 vector of the true main effect coefficients; if |
Value
y |
a n-by-1 vector of treatment outcomes. |
A |
a n-by-1 vector of treatment indicators. |
X |
a n-by-p matrix of pretreatment covariates. |
SNR |
the "signal" (interaction effect) to "nuisance" (main effect) variance ratio (SNR) in the canonical parameter function. |
true.beta |
the true single-index coefficient vector. |
true.eta |
the true main effect coefficient vector. |
optTr |
a n-by-1 vector of treatments, indicating the optimal treatment selections. |
value.opt |
the "value" implied by the optimal treatment decision rule, |