3

I have an equation that I want to try and solve iteratively. I don't have any background in numerical analysis so unsure as to how to go about it. Any help would be greatly appreciated. My equation is:

$\hat{\tau}^2 = \left. \sum\limits_{i=1}^k \frac{\left(y_i - \left( \left. \sum\limits_{i=1}^k \frac{y_i}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right. \right)\right)^2 - \hat{\sigma}_i^2}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right.$

I want to try and find $\hat{\tau}^2$ but not sure how to go about doing this.

Also how would I do this in a computer programme/what would be the best computer programme to use for doing it?

Many thanks for the help.

EDIT, just to go through how I have got to this point.

$Y_i \sim \mathcal{N}(\mu, \hat{\sigma}_i^2 + \tau^2)$ where $Y_i$ is termed the effect size. This is a Meta-Analysis term but is basically just an odds ratio.

$f(y|\mu, \tau^2) = \frac{1}{\sqrt{2\pi(\hat{\sigma}_i^2 + \tau^2)}}\mbox{ exp}\left(\frac{-(y-\mu)^2}{2(\hat{\sigma}_i^2 + \tau^2)}\right)$

$L(\mu, \tau^2) = -\frac{1}{2}\sum\limits_{i=1}^k \mbox{log}(2\pi(\sigma_i^2 + \tau^2)) - \frac{1}{2}\sum\limits_{i=1}^k \frac{(y_i-\mu)^2}{\sigma_i^2 + \tau^2}$

By taking partial derivatives and setting to zero, I have got that:

$\hat{\mu} = \left. \sum\limits_{i=1}^k \frac{y_i}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right.$

$\hat{\tau}^2 = \left. \sum\limits_{i=1}^k \frac{(y_i - \hat{\mu})^2 - \hat{\sigma}_i^2}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right.$

From this point, given data which will give me values for the $y_i$ and the $\sigma_i$ I want to compute $\hat{\mu}$ and $\hat{\tau}^2$.

I thought that the best thing to do would be to plug in the formula of $\hat{\mu}$ into the forumla for $\hat{\tau}^2$ so I only had one equation to solve.

Hence why I got:

$\hat{\tau}^2 = \left. \sum\limits_{i=1}^k \frac{\left(y_i - \left( \left. \sum\limits_{i=1}^k \frac{y_i}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{\hat{\sigma}_i^2 + \hat{\tau}^2} \right. \right)\right)^2 - \hat{\sigma}_i^2}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right/ \left. \sum\limits_{i=1}^k \frac{1}{(\hat{\sigma}_i^2 + \hat{\tau}^2)^2} \right.$

denby47
  • 31
  • 4
  • Any information about the $y_i$ or the $\sigma_i$ or the background of this problem? – Thomas Nov 11 '14 at 20:45
  • Sorry, yes I should have explained the problem in more detail. The $\hat{\tau^2}$ is the between study variance of a random effects meta-analysis derived from maximum likelihood methods. Each of the $y_i$ and $\sigma_i$ are known and are respectively the odds ratio and variance of a particular trial in the meta analysis. – denby47 Nov 12 '14 at 15:14
  • Both sums run over $i$. Could you make sure, which indicies are $i$ and which are actually $j$? – Thomas Nov 12 '14 at 15:29
  • Hi I have edited my question to give a few more details about how I got to the formula which I ended up with. Hopefully this helps. Thanks very much. – denby47 Nov 12 '14 at 16:17

0 Answers0