I got an assignment to solve, which states the following:
Consider the model with heteroskedasticity: $$ Y_i = X_i'\beta + \epsilon_i $$ where $\epsilon_i$ is explicitly assumed as i.i.d. with $$ \epsilon_i \sim N(0,\sigma_i^2),\sigma_i^2 = \exp(Z_i'\gamma) $$ $Z_i'$ is a $m x 1$ vector including a constant term. $X_i$ is a $kx1$ vector of explanatory variables. No further assumptions are stated.
I am supposed to solve for the parameters of the error term distribution by (unconditional) Maximum Likelihood. In the solution, the classical result of equivalence of the ML estimator and the WLS estimator turns out as a result. This is not the problem, however, I am struggling with the setup. As far as I understood from resources such as Wooldridge's 'Econometrics for Cross-Section and Panel' or Hayashi's 'Econometrics', the i.i.d. assumption of $\epsilon_i$ implies that $Var(\epsilon_i)$ is homoskedastic by construction. In the assignment, the error term is assumed to have identical distribution, however is heteroskedastic. How does this make sense?
My guess would be that something is missing in the exercise. I am also a bit confused that the ML estimator coincides with the WLS estimator since I thought the problem of Heteroskedasticity in OLS can be solved by WLS only if the error term is heteroskedastic conditionally on the explanatory variables $X_i$. In addition, the above mentioned textbooks show the equivalence of OLS and MLE mainly using conditional distributions and conditional MLE. I think I am missing something here but I am not quite sure what.