search for: consdata

Displaying 1 result from an estimated 1 matches for "consdata".

Did you mean: confdata
2007 Apr 09
1
R:Maximum likelihood estimation using BHHH and BFGS
Dear R users, I am new to R. I would like to find *maximum likelihood estimators for psi and alpha* based on the following *log likelihood function*, c is consumption data comprising 148 entries: fn<-function(c,psi,alpha) { s1<-sum(for(i in 1:n){(c[i]-(psi^(-1/alpha)*(lag(c[i],-1))))^2* (lag(c[i],-1)^((-2)*(alpha+1)) )}); s2<- sum(for(m in 1:n){log(lag(c[m],-1)^(((2)*alpha)+2))});