[R-sig-Geo] problem with likfit and na.action

Sara Kleyer sara.kleyer at uni-bamberg.de
Wed Aug 31 16:54:15 CEST 2011


Hi:

when running the following command, the prediction works fine, but 
missing values are deleted in the dataset:

geo <- as.geodata(fakeland, coords.col=2:3, data.col=9, covar.col=4:8)
cov.est<-likfit(geo, cov.model="powered.exponential", 
ini.cov.pars=c(1,1), kappa=1, trend="1st")
kri.set<-krige.control(type.krige="ok", trend.d="1st", trend.l="1st", 
obj.model=cov.est)
schatz<-krige.conv(geo, locations=cord, krige=kri.set)

However, if I modify the na.action in geo to na.action="ifcovar",  the 
same likfit-command returns
---------------------------------------------------------------
likfit: likelihood maximisation using the function optim.
likfit: Use control() to pass additional
          arguments for the maximisation function.
         For further details see documentation for optim.
likfit: It is highly advisable to run this function several
         times with different initial values for the parameters.
likfit: WARNING: This step can be time demanding!
---------------------------------------------------------------
Fehler in if (sumnegloglik > (.Machine$double.xmax^0.5) | sumnegloglik 
==  :
   Fehlender Wert, wo TRUE/FALSE nötig ist

And the prediction doesn't work any more.

What ist the problem about that?

Thanks a lot for your help!

Sara



More information about the R-sig-Geo mailing list