HiI have a probability mass function similar to pr(N=n)= 
integral(((2-x)^n)*(exp(ax-2))) - integral (((5-ax)^n)),   both integrals are 
defined over the interval(0,2) with respect to x. I am going to estimate the 
parameter (a) with method of maximum likelihood estimation. The loglikelihood  
is :               [F log(pr(n))]=lnL  where F is the vector of observations 
and (n) is the vector of input for  the defined pmf . Can anybody suggest me 
the fastest way of getting the MLE?I have tried this 
program:n<-c(0,1,2,3,4,5,6,7,8)F<-c(0,0,1,3,5,7,8,11,10)loglik<- function(a) 
{sum(F*log(pr(n)))}re<- maxlik(loglik, start=.5)summary(re)
I don't know how to define the probability mass function ( pr(n) ) in the 
written program.I would appreciate for any help.Best Regards


        [[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.

Reply via email to