R/meta_model.R
meta.lm.stdmean.ps.Rd
This function estimates the intercept and slope coefficients in a meta-regression model where the dependent variable is a paired-samples standardized mean difference. The estimates are OLS estimates with robust standard errors that accommodate residual heteroscedasticity.
meta.lm.stdmean.ps(alpha, m1, m2, sd1, sd2, cor, n, X, stdzr)
alpha level for 1-alpha confidence
vector of estimated means for measurement 1
vector of estimated means for measurement 2
vector of estimated SDs for measurement 1
vector of estimated SDs for measurement 2
vector of estimated correlations for paired measurements
vector of sample sizes
matrix of predictor values
set to 0 for square root unweighted average variance standardizer
set to 1 for measurement 1 SD standardizer
set to 2 for measurement 2 SD standardizer
Returns a matrix. The first row is for the intercept with one additional row per predictor. The matrix has the following columns:
Estimate - OLS estimate
SE - standard error
t - t-value
p - p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Bonett DG (2009). “Meta-analytic interval estimation for standardized and unstandardized mean differences.” Psychological Methods, 14(3), 225--238. ISSN 1939-1463, doi:10.1037/a0016619 .
n <- c(65, 30, 29, 45, 50)
cor <- c(.87, .92, .85, .90, .88)
m1 <- c(20.1, 20.5, 19.3, 21.5, 19.4)
m2 <- c(10.4, 10.2, 8.5, 10.3, 7.8)
sd1 <- c(9.3, 9.9, 10.1, 10.5, 9.8)
sd2 <- c(7.8, 8.0, 8.4, 8.1, 8.7)
x1 <- c(2, 3, 3, 4, 4)
X <- matrix(x1, 5, 1)
meta.lm.stdmean.ps(.05, m1, m2, sd1, sd2, cor, n, X, 0)
#> Estimate SE z p LL UL
#> b0 1.01740253 0.25361725 4.0115667 0.000 0.5203218 1.5144832
#> b1 0.04977943 0.07755455 0.6418635 0.521 -0.1022247 0.2017836
# Should return:
# Estimate SE z p LL UL
# b0 1.01740253 0.25361725 4.0115667 0.000 0.5203218 1.5144832
# b1 0.04977943 0.07755455 0.6418635 0.521 -0.1022247 0.2017836