Simulates data from a simple linear mixed effects model, then calculates REML and HPS effect size estimators as described in Pustejovsky, Hedges, & Shadish (2014).

compare_RML_HPS(iterations, beta, rho, phi, design, m, n, MB = TRUE)

## Arguments

iterations

number of independent iterations of the simulation

beta

vector of fixed effect parameters

rho

intra-class correlation parameter

phi

autocorrelation parameter

design

design matrix. If not specified, it will be calculated based on m, n, and MB.

m

number of cases. Not used if design is specified.

n

number of measurement occasions. Not used if design is specified.

MB

If true, a multiple baseline design will be used; otherwise, an AB design will be used. Not used if design is specified.

## Value

A matrix reporting the mean and variance of the effect size estimates and various associated statistics.

## References

Pustejovsky, J. E., Hedges, L. V., & Shadish, W. R. (2014). Design-comparable effect sizes in multiple baseline designs: A general modeling framework. Journal of Educational and Behavioral Statistics, 39(4), 211-227. doi:10.3102/1076998614547577

## Examples

compare_RML_HPS(iterations=10, beta = c(0,1,0,0), rho = 0.3,
phi = 0.5, design=design_matrix(m=3,n=8))
#> 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.
#> 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.
#>                           mean          var
#> p_beta               0.9847397  0.073613086
#> r_theta              1.2720722  0.460753406
#> delta_AB             0.9289647  0.079624297
#> nu                   6.9054883 10.142207845
#> kappa                0.3545964  0.006256692
#> g_AB                 0.8093198  0.079686515
#> V_g_AB               0.2467520  0.002796612
#> cnvg_warn            0.0000000  0.000000000
#> sigma_sq             0.8119100  0.103050307
#> phi                  0.4551261  0.077315335
#> Tau.id.var(constant) 0.4601622  0.537825084
#> rho                  0.2786148  0.081782119
#> RML_coverage1        1.0000000  0.000000000
#> RML_coverage2        1.0000000  0.000000000
#> D_bar                1.1252940  0.087464761
#> S_sq                 1.2659887  0.438082999