[R-sig-Geo] Bug in surf.ls (spatial package)?
ONKELINX, Thierry
Thierry.ONKELINX at inbo.be
Tue Apr 10 15:39:08 CEST 2007
Dear listers,
When fitting a trend surface I noticed that surf.ls() generates other
values for the model parameters than an ordinary lm(). Since both fit,
in my opinion, the same model to the same data. So I would suppect that
both would generate the same parameter values. Or am I missing
something?
Some sample code.
library("gstat")
data(jura)
library("spatial")
surface.surf <- surf.ls(np = 1, x = prediction.dat$Xloc, y =
prediction.dat$Yloc, z = prediction.dat$Ni)
surface.lm <- lm(Ni ~ Xloc + Yloc, data = prediction.dat)
surface.surf$beta
[1] 18.828803 4.823595 -2.375896
surface.lm$coef
(Intercept) Xloc Yloc
15.5140337 2.2466673 -0.9299007
Thanks,
Thierry
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be
Do not put your faith in what statistics say until you have carefully
considered what they do not say. ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
More information about the R-sig-Geo
mailing list