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 25.05976 573.9771 1.045995 13.86356 0.1020591 0.9883691 0.05323559 0
#> 2 31.61312 515.5729 1.392266 15.10370 0.1307642 1.3219672 0.08622091 0
#> 3 25.85933 344.3234 1.393587 21.79026 0.1525620 1.3450640 0.07040655 0
#> 4 32.42376 334.7518 1.772156 26.52814 0.1426371 1.7215768 0.08206981 0
#> 5 30.04375 575.9994 1.251824 14.98963 0.1252881 1.1881269 0.07210766 0
#> sigma_sq phi Tau.case.var((Intercept))
#> 1 180.0953 0.01687204 393.8817
#> 2 186.8672 0.26289185 328.7057
#> 3 170.9899 0.25833287 173.3335
#> 4 181.7095 0.09655656 153.0424
#> 5 204.6715 0.21183269 371.3279