Hi,
I would like estimate a model for function of production's Coob-Douglas using maximum likelihood. The model is log(Y)= beta[1]+beta[2]*log(L)+beta[3]*log(K). I tried estimate this model using the tools nlm ( ) and optim ( ) using the log-likelihood function below:
> mloglik <- function (beta, Y, L, K) {
+ n <- length(Y)
+ sum ( (log(Y)- beta[1]-beta[2]*log(L)-beta[3]*log(K))^2)/2*beta[4]^2 + n/2*log(2*pi)+ n*log(beta[4])
+ }
Then I did estimates the parameters using nlm ( ) and optim ( ), but the estimates were very bad. I used these codes:
> mlem <- nlm (mloglik, c(1,1,1,1), Y=Y, L=L, K=K)
> mlem2 <- optim(c(1,1,1,1), mloglik, Y=Y, L=L, K=K, method="BFGS")
How I improve the estimates???? What's the best and more simple form for estimate a modelo using the maximum likelihood's method???
Best regards,
André Barbosa Oliveira
Student of Master in Economics at University Federal of Rio Grande do Sul - Brazil
_________________________________________________________________
Novo windowslive.com.br. Descubra como juntar a galera com os produtos Windows Live.
[[alternative HTML version deleted]]
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.