[R-sig-Geo] Maximizing likelihood function

Jimmy Neutrón jimmyjmv at hotmail.com
Tue Mar 24 21:45:37 CET 2015


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]]



More information about the R-sig-Geo mailing list