gen_outcome_model: Generate data for a multilevel outcome

Description Usage Arguments Value Examples

View source: R/gen_outcomes.R

Description

Generate data for a multilevel outcome

Usage

1
2
3
gen_outcome_model(fixed, fixed_param, random_var, fact_vars,
  cov_param = NULL, cor_vars = NULL, ngrps, unbalanceRange,
  type = "binary", with_err_gen = NULL, error_var = NULL)

Arguments

fixed

a formula with RHS only that specifies the variables to use

fixed_param

a vector of numerics for the coefficients of variables in fixed

random_var

a numeric, length 1, variance of random (school level) component

fact_vars

for each variable in fixed that is a factor, a definition...

cov_param

a list, defining any continuous variables

cor_vars

correlations between fixed variables

ngrps

number of schools

unbalanceRange

range of enrollments in each school

type

character, either "binary" or "linear" to choose outcome variable type to generate

with_err_gen

name of a distribution function to generate the errors, optional

error_var

integer values to pass to err_gen, optional

Value

a list with two elements

Examples

1
zed2 <- do.call(gen_outcome_model, sim_control()$gpa_sim_parameters)

OpenSDP/OpenSDPsynthR documentation built on June 20, 2020, 6:18 a.m.