View source: R/functions_gofLMM.R
sim.data.cluster | R Documentation |
This function can be used to simulate (balanced) cluster data as used in the simulation study of Peterlin et al. See the paper for details.
sim.data.cluster( N, n, betas, norm.eps, var.eps = NULL, shape = NULL, scale = NULL, norm.re.intercept, var.re.intercept = NULL, shape.re.intercept = NULL, scale.re.intercept = NULL, sim.re.slope, norm.re.slope = NULL, var.re.slope = NULL, shape.re.slope = NULL, scale.re.slope = NULL, sim.x2.qdr = FALSE, b.qdr = NULL )
N |
number of clusters |
n |
number of subjects per cluster (the same for all clusters) |
betas |
Vector of true regression coefficients for the fixed effects |
norm.eps |
Logical, if TRUE the errors are simulated from a (zero mean) normal distribution with variance |
var.eps |
see above |
shape |
see above |
scale |
see above |
norm.re.intercept |
Logical, if TRUE the random intercepts are simulated from a (zero mean) normal distribution with variance |
var.re.intercept |
see above |
shape.re.intercept |
see above |
scale.re.intercept |
see above |
sim.re.slope |
Logical. If TRUE random slopes are simulated. |
norm.re.slope |
Logical, if TRUE the random slopes are simulated from a (zero mean) normal distribution with variance |
var.re.slope |
see above |
shape.re.slope |
see above |
scale.re.slope |
see above |
sim.x2.qdr |
Logical. If TRUE the square of X2 is included in the true (correct) fixed effects design matrix. |
b.qdr |
True beta coefficient associated with the square of X2 |
Rok Blagus, rok.blagus@mf.uni-lj.si
gof.lmm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.