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 29.09299 253.8880 1.825859 47.77448 0.1782359 1.797045 0.06767536 0
#> 2 30.63415 524.2336 1.337961 16.88880 0.1414642 1.277652 0.07681072 0
#> 3 34.38554 276.2147 2.068962 40.78824 0.1678629 2.030684 0.08220169 0
#> 4 29.76780 270.7829 1.808989 43.35026 0.1671797 1.777511 0.06683285 0
#> 5 28.89947 453.7277 1.356726 20.36472 0.1545878 1.306139 0.07190655 0
#> sigma_sq phi Tau.case.var((Intercept))
#> 1 183.6514 0.2101787 70.23665
#> 2 214.3173 0.2935651 309.91634
#> 3 186.3819 0.1725594 89.83287
#> 4 186.3766 0.1527703 84.40634
#> 5 217.6181 0.3092078 236.10960