[R-sig-Geo] Maximizing likelihood function
Baldwin, Jim -FS
jbaldwin at fs.fed.us
Tue Mar 24 22:24:29 CET 2015
It sounds like the function .negloglik.boxcox is being fed some parameters it doesn't like (and possibly it doesn't like the starting values). Possibly attempting to divide by zero. So I would first check .negloglik.boxcox with the starting values to see if something other than infinity comes out.
Jim
-----Original Message-----
From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Jimmy Neutrón
Sent: Tuesday, March 24, 2015 1:46 PM
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Maximizing likelihood function
Dear comRades:
I'm working with the variogram "mattern". Then, I tried to run this function many times to achieve the best parameters for my geodata function (XXSelg) by means of likfit, then I wrote:
likfit(XXSelg, cov.model="matern", ini.cov.pars=c(4.0, 1.8), kappa=3.5, fix.kappa=FALSE, nugget=0.8, lambda=0.01, fix.lambda=FALSE, hessian=TRUE) however, many times I received the following answer:
likfit: end of numerical maximisation.Error en optim(par = 1, fn = .negloglik.boxcox, method = "L-BFGS-B", lower = limits$lambda["lower"], : L-BFGS-B needs finite values of 'fn'
One user mentioned that I have to change the method in optim. But likfit only accept RELM or ML.
Then, how can I change the method in likfit???. I wonder if it possible to do it in likfit, because I don't understand the optim script very well (in R-help for package stats).
Does it mean that I can use any of this method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN"), which are mentioned in optim???
Thanks in advance for youR contribution.
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list