https://github.com/cran/fields
Raw File
Tip revision: c71fb7f6ffa323303affebf0e35a0070faa9c24d authored by Doug Nychka on 10 May 2004, 00:00:00 UTC
version 1.7.2
Tip revision: c71fb7f
Krig.parameters.R
"Krig.parameters" <-
function(obj, mle.calc=TRUE){
# takes fitted estimate and lambda and returns various estiamtes of sigma
# and rho

shat.GCV <- sqrt(sum(obj$weights * 
obj$residuals^2.)/(length(obj$y) - obj$trace))

if(mle.calc) {  rhohat <- sum(out$c * out$yM)/(out$N - out$nt)
shat.MLE <- sqrt(rhohat * out$lambda)}
else{ rhohat<- shat.MLE<- NA}
list( shat.GCV=shat.GCV, shat.MLE= shat.MLE, rhohat= rhohat)
}
back to top