[R] Finding MLE

li li hannah.hlx at gmail.com
Sun Nov 2 19:36:56 CET 2014

Hi all,
  I am trying to use the mle function in R to find the maximum likelihood
estimator. The ll function below is the negative of the log likelihood.
Suppose x0 is the observed values, I want to find the maximum likelihood
for a and b. After running the code below, I get the error message "Error
in eval(expr, envir, enclos) : argument is missing, with no default".
  Could anyone familiar with this function give some suggetion? Thanks very

> n <- 8
> x0 <- c(2,3)
> ll<- function(a,b,x=x0,size=n){
> fit <- mle(ll, nobs = length(x0))

	[[alternative HTML version deleted]]

More information about the R-help mailing list