I have a small number of studies where the same model was calculated and want to infer the typical standard residual deviation. I have the degrees of freedom, the sum of the squares SSR and the mean of the square of the residuals MSR, but not the residuals themselves. My current plan is to do a bayesian meta analysis using either WinBugs or jags using two steps:
1) Assume the residual standard deviation is really the same over all studies and just try to estimate it more precisely. Let's call the overall residual variance res.var
With this, I already run into practical problems with the BUGS modelling language. I wanted to model the residual sum of squares using a chi square distribution, but have problems scaling the data accordingly. My problem is what I wanted to use is that for each study $$ \frac{SSR}{\text{res.var}} \sim \chi^{2}_{k}. $$ But I have problem putting this into a bugs model. I tried to use
model
{
for (i in 1:N)
{
chisquare[i] <- sumsq[i]/res.var
chisquare[i] ~ dchisqr(df[i])
}
res.var~dunif(0,1)
}
but this gives an multiple definitions of chisquare error. I tried transforming the first definition of chisquare so that sumsq is on the left side, but data can not be put on the left side of a logical node. Any practical advice?
2) Should I get this model to run, I would also like to allow for some variation of the residual standard deviation over studies, due to there being at least some small differences in the study population not included in the meta analysis model but I am not certain what a good hyperdistribution for the variance could look like. Any pointers?