[R] MLE

2014-10-31 Thread Parvin Dehghani
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

[R] Maximum likelihood Estimation

2014-10-10 Thread Parvin Dehghani
maximum likelihood estimation pari hesabi 6:04 AM To: r-help@r-project.org Hello, As an example for Exponential distribution the MLE is got by this structure: t - rexp(100, 2) loglik - function(theta){ log(theta) - theta*t} a - maxLik(loglik, start=1) print(a) Exponential distribution has a