[R-meta] Prediction Intervals for estimates of random slope rma.mv model with predict.rma()

James Pustejovsky jepu@to @end|ng |rom gm@||@com
Mon Mar 25 17:45:40 CET 2024


> Thanks again for the follow up - I was pretty sure I was missing
> something. To take this one more step further, let's say I had
> multiple random slopes on the same level - would the covariance between
> them also need to be taken into the account? How would the equation look in
> that case?
>
> Yes, you'd need to take all covariances into account. The equation would
just be variance algebra. Say that the row-vector of fixed effect
predictors is x_ij and the row-vector of random effects terms is z_ij. The
model is

Y_ij = x_ij beta + z_ij u_j + e_ij

where the variance-covariance matrix of u_j is Tau and the sampling
variance of beta-hat is Vbeta.

The prediction interval at a given set of values would be
mu = x_ij beta-hat
sigma_sq = Var(x_ij beta-hat) + Var(z_ij u_j) = x_ij Vbeta x_ij' + z_ij Tau
z_ij'
mu +/- crit * sqrt(sigma_sq)

If you have multiple sets of independent random effects terms, then each
set would need to be added. For example, say that you've got

Y_ij = x_ij beta + z0_ij u_j + z1_ij v_ij + e_ij

where Var(u_j) = Tau and Var(v_ij) = Omega and the u_j's are independent of
the v_ij's. Then sigma_sq would need to be calculated as

sigma_sq = Var(x_ij beta-hat) + Var(z0_ij u_j) + Var(z1_ij u_j) = x_ij
Vbeta x_ij' + z0_ij Tau z0_ij' + z1_ij Omega z1_ij'

James

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list