[R] MLE

dpender d.pender.1 at research.gla.ac.uk
Wed Feb 23 12:39:32 CET 2011


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.



More information about the R-help mailing list