Profit maximization problem using linear regression I'm currently on a university assignment where I'm stuck more or less in the middle. I have to answer the following problem:
Suppose you are interested in estimating the production function for agricultural output (as in the seminal article  Mundlak 1961).  You have access to data for a large number of farms $i$ for $T \geq 1$ time periods. The
production function you want to estimate is:
\begin{equation}
y_{it} = x_{it}\beta + \alpha_i + \epsilon_{it}
\end{equation}
where $y_{it}$ is log-output, $x_{it}$ is log-labour (a variable input), $\alpha_i$ is log-soil-quality (a fixed input) and $\epsilon_{it}$ is rainfall (a random input). Each farmer knows the price of output $P_t$, the wage rate $W_t$, and the soil quality of his farm $\alpha_i$. However, as the
econometrician you only observe ($y_{it}$, $x_{it}$). Assume that $\epsilon_{it}\sim \text{IID Dist}$ and independent of everything else in the model.
Solve the farmer’s profit maximization problem assuming he sells output
at a common (across farmers) market price $P_t$ and pays common
wages $W_t$. (Hint: It may help to write down the production function in levels instead of logs.) For notational convenience, assume $\mathbb{E}(e{^{\epsilon_{it}}})  = \lambda$. Does the labor demand depend on $\alpha_i$? Explain the economic intuition behind the result.
Would anyone give me some hints on how to tackle this task?
Extremely glad for any help!
 A: The hint tells you to transform to level instead of log ...
$$y_{it} = x_{it}\beta + \alpha_i + \epsilon_{it}$$ is log of the production function. So production must be
$$Y_{it} = A_iX_{it}^\beta\cdot u_{it}$$
found by taking exponential
$$\exp(y_{it}) = \exp(x_{it}\beta + \alpha_i + \epsilon_{it})$$
and defining $Y_{it} = exp(y_{it})$ $X_{it}=\exp(x_{it})$ and $A_i = \exp(\alpha_i)$ and $u_{it} = \exp(\epsilon_{it})$.
Profit max problem is then
$$ \max_{X_{it}}\Pi_{it} = P_t A_iX_{it}^\beta\cdot u_{it} - W_t X_{it} $$
Given the iid character of $\epsilon_{it}$ and the farmers knowledge the expected profit is the same with $\mathbb E[u_{it}]$ substituted for $u_{it}$:
$$ \max_{X_{it}}\mathbb E [\Pi_{it}] = P_t A_iX_{it}^\beta\cdot \mathbb E [u_{it}] - W_t X_{it} $$
The solution for labour demand is 
$$X_{it}^\star= \left(\frac{P_tA_i \mathbb E [u_{it}] }{W_t}\right)^{\frac{1}{1-\beta}}$$
higher price, soil quality and expected rainfall are all expected to increase marginal revenue of labor and therfore increase labor demand for a given wage.
