makeInpData.Rd
makeInpData
is a function for generating a data based on
the given information.
makeInpData(
N,
R2Y,
R2eta,
omega,
tau0,
tau1,
betaL,
betaY,
linear = TRUE,
ydist = "n",
lambda,
nitem,
nfac = 1,
lvmodel,
fcovmat,
item.missing = TRUE,
misspec = FALSE,
cov.res = 0,
relsize = 0.6
)
a numeric indicating sample size.
a numeric indicating predictive power of covariates.
a numeric indicating Predictive power of latent variable
a numeric indicating the size of effect of latent factor on the outcome.
a numeric indicating the size of difference in the outcome between the treatment and the control.
a numeric indicating the principal effect
a numeric vector indicating the effects of covariates on the latent factor
a numeric vector indicating the effects of covariates on the outcome
a logical whether the relationship between the outcome and covariates is linear (default is TRUE
).
a character indicating the outcome distribution (default is n
).
a numeric indicating the mean of Worked problems/person. (extent to which covariates predict eta).
a numeric indicating the number of maximum measurement items given to students.
a numeric indicating the number of latent factors
a character specifying a type of latent variable model.
a matrix indicating the variance-covariance matrix of latent factors when nfac > 1
a logical to make the measurement item data missing for
the control group (default is TRUE
).
a logical to allow cross-loadings across latent factors
when nfac > 1 (default is FALSE
).
a logical to allow for residual correlations
(only for CFA model) (default is 0
).
a numeric indicating the degree to which the latent factor explain the variances of continuous items (only for CFA model) (default is 0.6
).
a list containing all the data related to population values and running FLPS.
sdat <- makeInpData(
N = 200, # sample size
R2Y = 0.2, # r^2 of outcome
R2eta = 0.5, # r^2 of eta by one covariates
omega = 0.2, # the effect of eta
tau0 = 0.13, # direct effect
tau1 = -0.06,# interaction effect between Z and eta
betaL = 0.2,
betaY = 0.4,
lambda = 0.8, # the proportion of administered items
nitem = 10, # the total number of items
nfac = 1, # the number of latent factors
lvmodel = '2pl' )