[R-sig-Geo] geoR: variofit question

Christopher Moore moor0554 at umn.edu
Sat Jun 6 18:44:44 CEST 2009


Hi Laura,

Not sure if this is correct, but it might help you replicate the published
results:

library(geoR)
?variofit
?variog
vario100 <- variog(s100, max.dist=1)
ini.vals <- expand.grid(seq(0,1,l=5), seq(0,1,l=5))
(wls <- variofit(vario100, ini=ini.vals, fix.nug=TRUE, weights="cressie"))
plot(vario100); lines(wls)
(wls.sum <- summary(wls))
(sse <- wls.sum$sum.of.squares)
(n <- length(s100$data))
(p <- length(wls.sum$estimated.pars))
(df <- n-p-1)
(mse <- sse/df)
(rmse <- sqrt(mse))

Could you follow up and let me know if this approach worked?

-Chris

--
Christopher Moore, M.P.P.
Doctoral Student
Quantitative Methods in Education
University of Minnesota
44.9785°, -93.2396°
moor0554 at umn.edu
http://umn.edu/~moor0554

-----Original Message-----
Date: Fri, 05 Jun 2009 09:33:39 -0500
From: Laura Chihara <lchihara at carleton.edu>
Subject: [R-sig-Geo] geoR: variofit question
To: r-sig-geo at stat.math.ethz.ch
Message-ID: <4A292CC3.8040001 at carleton.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


I'm reading some papers that compare various
theoretical semi-variogram models to data using
weighted least squares. In the papers, the authors
look at the root mean square error. I would like
to try to replicate the results.

Is there a way to extract the RMSE when
using weighted least squares for fitting
(the option="cressie" in variofit)?

Thank you.

-- Laura Chihara

*******************************************
Laura Chihara
Professor of Mathematics   507-222-4065 (office)
Dept of Mathematics        507-222-4312 (fax)
Carleton College
1 North College Street
Northfield MN 55057



More information about the R-sig-Geo mailing list