Skip to content
Prev 542 / 5632 Next

[R-meta] Collapsing a between subject factor

Dear Michael,

Many thanks for your response.  Indeed, the sample sizes are unequal which is apparently why it was treated as two analyses.

I?ve been playing with this example others and your example below overestimates the variance.  I think this is because the means are being squared rather than the delta from the combined:

S_c <- (n_1 * (v_1 + (m_1 - m_c) ^2 ) + n_2*( v_2 + ( m_2 - m_c) ^2) ) / ( n_1 + n_2)

This still overestimates the known population variance of 4, so applying the bessel correction:

S_c_2 <- ( (n_1 - 1 )*( v_1 +( m_1 - m_c ) ^2 ) + ( n_2 - 1)*( v_2 + ( m_2 - m_c)^2) ) / ( ( n_1 + n_2) -1 )

leads to a good estimate of the combined variance.  Code:
[1] 0.001710072

Many thanks for your advice - I?d have been stuck without your input!

Best wishes,

Oliver