Skip to content
Prev 244111 / 398506 Next

Using nlminb for maximum likelihood estimation

Joonas - as_trix85 <ast_rix85 <at> hotmail.com> writes:
It will be more efficient to set aside space for the full
h and p vectors (h <- p <- numeric(length(r))) rather than
building them up one step at a time.  Also, I think you can
compute p outside the loop:

 -sum(dnorm(r,theta[1],sqrt(h),log=TRUE))
I don't see a question here, nor a reproducible example ...
can you look to see in more detail what garchFit does?  Does it
have a way to generate better starting parameter estimates?
Have you tried turning on tracing to see where your
approach is getting stuck?