https://github.com/cran/fields
Raw File
Tip revision: e67a1fb4dcdbae26b03d4c4fe859ea995aac2720 authored by Doug Nychka on 12 November 2007, 00:00:00 UTC
version 4.1
Tip revision: e67a1fb
Krig.cor.Y.R
Krig.cor.Y<- function(obj, verbose=FALSE ){

# subtract mean
if( !is.na( obj$mean.obj[1])){
Y<- obj$y - predict(obj$mean.obj, obj$x)
}

# divide by sd
if( !is.na( obj$sd.obj[1])){
Y<- Y/predict(obj$sd.obj,obj$x)
}

Y
 

}

back to top