Hi list,

 

I've splitted my dataset (e.g. the meuse dataset) into random 2 parts (2/3
for prediction and 1/3 for validation). I've done an interpolation (e.g.
IDW, but I also want to do it with different kriging techniques) based on
the prediction dataset. Now I want to subtract the "zinc" values from the
validation dataset (i.e. a SpatialPointsDataFrame with 52 points) from the
"var1.pred" values from the interpolation (i.e. a SpatialPointsDataFrame
with 3103 points) to obtain the residuals. This of course only on the
location of the 52 points from the validation dataset. Then I want to
calculate validation indices.

 

This is my code:

 

#Validation and prediction dataset

permid <- sample(155)

idportion <- 1:round(2*155/3)

meuse.pred <- meuse[permid[idportion], ] 

meuse.val <- meuse[permid[-idportion], ]

 

#idw based on meuse.pred

idw.pred.zn <- idw(zinc ~ 1, meuse.pred, meuse.grid)

 

I know that I could use the "krige.cv" to do an n-fold cross-validation, but
I would like to do it based on the above method.

 

Any suggestions? 

 

Thanks a lot!

 

Els 

 

______________________________________________

Dr. Els Verfaillie

Carto-GIS cluster

Ghent University (UGent) - Department of Geography

Krijgslaan 281 - S8  B- 9000 Gent  Belgium

______________________________________________

 

 


	[[alternative HTML version deleted]]

