Hi, I am looking for some help regarding the use of the mle function. I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that have been defined in the the log-likelihood equation as theta0=theta[1], theta1=theta[2] and theta2=theta[3]. My R code for mle is: mle(Poisson.lik, start=list(theta=c(20,1,1), method="Nelder-Mead", fixed=list(w=w, t1=t1, t2=t2)) But I keep getting the following error, Error in eval(expr, envir, enclos) : argument is missing, with no default I am trying to maximise theta starting at (20,1,1) over a fixed range of w, t1 and t2. Can anyone shed some light as to what is going on? Thanks, Doug -- View this message in context: http://r.789695.n4.nabble.com/mle-tp3318856p3318856.html Sent from the R help mailing list archive at Nabble.com.
Hi, I am looking for some help regarding the use of the mle function. I am trying to get mle for 3 parameters (theta0, theta1 and theta2) that have been defined in the the log-likelihood equation as theta0=theta[1], theta1=theta[2] and theta2=theta[3]. My R code for mle is: mle(Poisson.lik, start=list(theta=c(20,1,1), method="Nelder-Mead", fixed=list(w=w, t1=t1, t2=t2)) But I keep getting the following error, Error in eval(expr, envir, enclos) : argument is missing, with no default I am trying to maximise theta starting at (20,1,1) over a fixed range of w, t1 and t2. Can anyone shed some light as to what is going on? Thanks, Doug -- View this message in context: http://r.789695.n4.nabble.com/mle-tp3318857p3318857.html Sent from the R help mailing list archive at Nabble.com.
Hi, I am having problems carrying out a mle for 3 parameters in a non-homogenous poisson process. I am trying to use the optim function to minimise the -ve log-likelihood. When I use assumed values of my three parameters (20,1,1) the -ve log-likelihood function returns a value of 1309122 but I i then use these values as a starting point in the optim function the parameter estimates and the function value are much lower. Below is a summary of the output:> optim(c(20,1,1), fn=Poisson.lik, gr=NULL, method="Nelder-Mead",w=w, t1=t1, > t2=t2)$par [1] 0.004487104 -2.657468035 12.186003355 $value [1] 289.6901 $counts function gradient 220 NA $convergence [1] 0 $message NULL There were 50 or more warnings (use warnings() to see the first 50) Where the warnings are: 1: In log(((theta0 * w * t2[i]) - (theta1 * cos(w * t2[i])) + ... : NaNs produced I thought I was using optim correctly but obviously not! Does anyone have any suggestions as to what to try? Thanks, Doug -- View this message in context: http://r.789695.n4.nabble.com/MLE-tp3320852p3320852.html Sent from the R help mailing list archive at Nabble.com.
Possibly Parallel Threads
- Issues when trying to fit a nonlinear regression model
- Issues when trying to fit a nonlinear regression model
- Issues when trying to fit a nonlinear regression model
- Issues when trying to fit a nonlinear regression model
- Issues when trying to fit a nonlinear regression model