What do you mean by the "estimates were very bad"? In nearly 40 years of working with optimization, I've seen badly set-up functions cause troubles, I've seen multiple minima situations, I've seen comparisons of results from one data set to the estimates for another, and I've seen optimization produce the proper results when published ones were just plain wrong.
So there are many possibilities. And for Cobb-Douglas functions, I've seen least squares estimates based on the log of the production function give estimates with different signs from those using a nonlinear least squares objective on the original exponential form. You are not the first to step in the cow pie of Cobb Douglas. We need some numbers please. If you send a file or files (I don't think you can attach files to Rhelp, but can do so off-list) with a runnable script and the data, I'll be willing to try it out. JN > Message: 84 > Date: Tue, 3 Nov 2009 19:49:17 +0000 > From: Andre Barbosa Oliveira <andreab...@hotmail.com> > Subject: [R] Maximum Likelihood Estimation > To: <r-help@r-project.org> > Message-ID: <blu109-w2d5a97dbfd61d3976e589c2...@phx.gbl> > Content-Type: text/plain > > > 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, > > Andre' 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]] > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.