generates the different simulation scenarios. This function is
not intended to be called directly by users. See gendata
gendataPaper(n, p, corr = 0, E = truncnorm::rtruncnorm(n, a = -1, b =
1), betaE = 2, SNR = 2, hierarchy = c("strong", "weak", "none"),
nonlinear = TRUE, interactions = TRUE, causal, not_causal)
number of observations
number of main effect variables (X)
correlation between predictors
simulated environment vector of length n
. Can be continuous
or integer valued. Factors must be converted to numeric. Default:
truncnorm::rtruncnorm(n, a = -1, b = 1)
exposure effect size
signal to noise ratio
type of hierarchy. Can be one of c("strong", "weak",
"none")
. Default: "strong"
simulate non-linear terms (logical). Default: TRUE
simulate interaction (logical). Default: TRUE
character vector of causal variable names
character vector of noise variables
A list with the following elements:
matrix of
dimension nxp
of simulated main effects
simulated response
vector of length n
simulated exposure vector of length
n
linear predictor vector of length n
the function f1
evaluated at x_1
(f1(X1)
)
the function f1
evaluated at x_1
(f1(X1)
)
the function f1
evaluated at x_1
(f1(X1)
)
the function f1
evaluated at x_1
(f1(X1)
)
the value for \(\beta_E\)
the function
f1
the function f2
the function
f3
the function f4
an n
length
vector of the first predictor
an n
length vector of the
second predictor
an n
length vector of the third
predictor
an n
length vector of the fourth predictor
a character representing the simulation scenario identifier as described in Bhatnagar et al. (2018+)
character vector of causal variable names
character vector of noise variables
Requires installation of truncnorm
package. Not meant to be
called directly by user. Use gendata
.