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@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.

Reply via email to