[R] help for xvalid with external data

From: Giovanni Bacaro <bacaro_at_unisi.it>
Date: Tue, 08 Jul 2008 15:28:13 +0200


Hi, as usual I have a problem with R functions!

I formulated a geostatistical model with geoR.

I decided to include some covariates in my model, and I estimated all the parameters (linear model and covariance function parameters) by the likfit function as follows:  

mod1<-likfit(geodata, ini=varfitmodel, trend=~cov1 +cov2, lambda=0.5, cov.model="matern",kappa=0.5)  

Once I obtained my best model, I'd like to validate it using an external dataset by using the function xvalid.  

First of all, I transformed the external dataset in a geodata object, as usual, named

"validation_data"

,where also covariates were included.

Then I tried the following syntax:  

Validation<-xvalid(geodata, model=mod1,
locations.xvalid=validation_data$coords, data.xvalid= validation_data$data)  

Bur R says:

Trend elements not found.  

My question is: how can I specify the trend structure within the xvalid function?

Thank a lot

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 08 Jul 2008 - 13:38:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Jul 2008 - 14:31:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive