g_REML objectsimulate.g_REML.RdSimulates data from the linear mixed effects model used to estimate the specified standardized mean difference effect size. Suitable for parametric bootstrapping.
# S3 method for class 'g_REML'
simulate(object, nsim = 1, seed = NULL, parallel = FALSE, ...)a g_REML object
number of models to simulate
seed value. See documentation for simulate
if TRUE, run in parallel using foreach backend.
additional optional arguments
A matrix with one row per simulation, with columns corresponding to the output
of g_REML.
data(Laski)
Laski_RML <- lme(fixed = outcome ~ treatment,
random = ~ 1 | case,
correlation = corAR1(0, ~ time | case),
data = Laski)
suppressWarnings(
Laski_g <- g_REML(Laski_RML, p_const = c(0,1), r_const = c(1,0,1))
)
if (requireNamespace("plyr", quietly = TRUE)) {
simulate(Laski_g, nsim = 5)
}
#> Warning: 'g_REML()' is deprecated and may be removed in a later version of the package. Please use 'g_mlm()' instead.
#> Warning: 'g_REML()' is deprecated and may be removed in a later version of the package. Please use 'g_mlm()' instead.
#> Warning: 'g_REML()' is deprecated and may be removed in a later version of the package. Please use 'g_mlm()' instead.
#> Warning: 'g_REML()' is deprecated and may be removed in a later version of the package. Please use 'g_mlm()' instead.
#> Warning: 'g_REML()' is deprecated and may be removed in a later version of the package. Please use 'g_mlm()' instead.
#> p_beta r_theta delta_AB nu kappa g_AB V_g_AB cnvg_warn
#> 1 36.31270 313.1615 2.051986 54.41338 0.2194760 2.023572 0.08796964 0
#> 2 32.75465 325.1951 1.816356 50.23582 0.2094858 1.789103 0.07777491 0
#> 3 32.42127 215.3501 2.209315 32.07122 0.1508409 2.157243 0.10144715 0
#> 4 31.54182 403.3765 1.570477 19.76530 0.1409286 1.510121 0.08589485 0
#> 5 35.64106 586.0295 1.472282 14.30237 0.1336522 1.393703 0.09977295 0
#> sigma_sq phi Tau.case.var((Intercept))
#> 1 263.6206 0.4654535 49.54082
#> 2 258.1712 0.4172190 67.02385
#> 3 129.1306 0.1051952 86.21945
#> 4 184.2082 0.2006209 219.16822
#> 5 203.5547 0.3368855 382.47471