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)

Arguments

n

number of observations

p

number of main effect variables (X)

corr

correlation between predictors

E

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)

betaE

exposure effect size

SNR

signal to noise ratio

hierarchy

type of hierarchy. Can be one of c("strong", "weak", "none"). Default: "strong"

nonlinear

simulate non-linear terms (logical). Default: TRUE

interactions

simulate interaction (logical). Default: TRUE

causal

character vector of causal variable names

not_causal

character vector of noise variables

Value

A list with the following elements:

x

matrix of dimension nxp of simulated main effects

y

simulated response vector of length n

e

simulated exposure vector of length n

Y.star

linear predictor vector of length n

f1

the function f1 evaluated at x_1 (f1(X1))

f2

the function f1 evaluated at x_1 (f1(X1))

f3

the function f1 evaluated at x_1 (f1(X1))

f4

the function f1 evaluated at x_1 (f1(X1))

betaE

the value for \(\beta_E\)

f1.f

the function f1

f2.f

the function f2

f3.f

the function f3

f4.f

the function f4

X1

an n length vector of the first predictor

X2

an n length vector of the second predictor

X3

an n length vector of the third predictor

X4

an n length vector of the fourth predictor

scenario

a character representing the simulation scenario identifier as described in Bhatnagar et al. (2018+)

causal

character vector of causal variable names

not_causal

character vector of noise variables

Details

Requires installation of truncnorm package. Not meant to be called directly by user. Use gendata.

See also