[R-sig-Geo] retrieving fitted values from geoR model

Ken Nussear knussear at usgs.gov
Wed Nov 7 01:52:05 CET 2007


I'm trying to obtain the fitted values for a spatial model using  
likfit under geoR. When I use the statement

fitted(m4r, spatial = TRUE), per the instructions under help(likfit)

I get the following error

 > fitted(m4r, spatial = TRUE)
be patient ... this function currently require calling likfit again
Error in eval(object.call) : object "object.call" not found

If I ask the object for the call I get

 > m4r$call
likfit(geodata = spUta, trend = ~TransectLength + all.road +
     Urban, ini.cov.pars = c(0.82, 1949), nugget = 0.55, cov.model =  
"exponential",
     method.lik = "REML")



Can anyone provide help?

Thanks

Ken



The model summary is:

 > summary(m4r)
Summary of the parameter estimation
-----------------------------------
Estimation method: restricted maximum likelihood

Parameters of the mean component (trend):
   beta0   beta1   beta2   beta3
  1.1742  0.0008 -0.3758 -0.0001

Parameters of the spatial component:
    correlation function: exponential
       (estimated) variance parameter sigmasq (partial sill) =  1.167
       (estimated) cor. fct. parameter phi (range parameter)  =  1949
    anisotropy parameters:
       (fixed) anisotropy angle = 0  ( 0 degrees )
       (fixed) anisotropy ratio = 1

Parameter of the error component:
       (estimated) nugget =  0.2518

Transformation parameter:
       (fixed) Box-Cox parameter = 1 (no transformation)

Maximised Likelihood:
    log.L n.params      AIC      BIC
"-75.92"      "7"  "165.8"  "180.3"

non spatial model:
    log.L n.params      AIC      BIC
"-81.95"      "5"  "173.9"  "184.2"

Call:
likfit(geodata = spUta, trend = ~TransectLength + all.road +
     Urban, ini.cov.pars = c(0.82, 1949), nugget = 0.55, cov.model =  
"exponential",
     method.lik = "REML")




More information about the R-sig-Geo mailing list