search for: sa0910

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

Did you mean: a010
2010 Dec 16
1
Optim function with meta parameters
...am competes against all other 9. I have 190 observations in total and I need to estimate through a MLE the parameters of a poisson distribution to drive the results. Assuming the independency of the results, I wrote the following code calculating the log-likelihood of the double poisson derived: sa0910<-read.csv("c:/csv/sa0910.csv",header=T,sep=",") est<-c() poisson.lik<-function(theta,x){ lambda<-theta[1] mu<-theta[2] n<-length(data[,1]) logl<-sum(x[,1])*log(lambda)-n*lambda+sum(x[,2])*log(mu)-n*mu return(-logl) } for(i in 1:10){ data<-data.frame(subse...