MLE's for ANOVA Model

84 Views Asked by At

Given the ANOVA model $Y_{ij} = \mu_i + \varepsilon_{ij}, \varepsilon_{ij}\sim N(0, \sigma^2)$, $i = 1, 2, \ldots , I, \space j = 1,2, \ldots, n_i$, I am trying to find the MLE's $\hat\mu_1, \hat\mu_2, \ldots , \hat\mu_n, \hat\sigma^2$.

I have that the likelihood function is $L = \prod_{i=1}^{I}\prod_{j=1}^{n_i} \frac{1}{\sqrt{2\pi \sigma^2}} e^{-(Y_{ij} - \mu_i)^2 / 2\sigma^2}$

and thus the log-likelihood is

$\ell = -n\log 2\pi - n\log \sigma^2 + \sum_{i=1}^{I}e^{-\frac{1}{2\sigma^2}\sum_{j=1}^{n_i}(Y_{ij}-\mu_i)^2}$,

but the equation $\frac{\partial \ell}{\partial \mu_k} = 0$ does not allow me to explicitly calculate $\hat\mu_k$.

EDIT:

After a second attempt I have found $\hat\mu_k = \frac{1}{n_k}\sum_{j=1}^{n_k} Y_{kj}$ and $\hat\sigma^2 = \frac{\sum_{i=1}^{I}\sum_{j=1}^{n_i}(Y_{ij} - \mu_i)^2}{\sum_{i=1}^{I} n_i}$, is this correct?

I found that $\ell = -\frac{1}{2}\log 2\pi \sum_{i=1}^{I}n_i - \frac{1}{2}\log \sigma^2 \sum_{i=1}^{I}n_i - \frac{1}{2\sigma^2}\sum_{i=1}^{I}\sum_{j=1}^{n_i}(Y_{ij} - \mu_i)^2$, where abouts is it incorrect?

1

There are 1 best solutions below

0
On

Denote $\sigma ^ 2 = \theta $, thus \begin{align} L(\mu, \theta) = \left( \frac{1}{(2 \pi \theta ) ^{0.5}} \right)^ {\sum_{i=1}^I n_i} \exp\{ - (Y_{ij} - \mu_i ) ^ 2 / (2\theta) \}, \end{align} \begin{align} l(\mu, \theta) = 0.5\sum_{i=1}^I n_i \ln \left( 2\pi \theta \right) + \frac{1}{2\theta}\sum_i^I \sum_j^{n_i} (Y_{ij} - \mu_i)^2 \end{align} Therefore, \begin{align} \frac{\partial }{ \partial \theta }l(\mu, \theta) = \frac{\sum_i^I n_i}{2\theta} + \frac{1}{2\theta ^ 2}\sum_i^I \sum_j^{n_i} (Y_{ij} - \mu_i)^2 = 0, \end{align} \begin{align} \hat \theta_{MLE} = \sum_i^I \sum_j^{n_i} (Y_{ij} - \hat \mu_i)^2 \end{align} where $$ \hat \mu_i = \frac{1}{n_i} \sum_{j=1}^{n_i} Y_{ij} . $$