s-news
[Top] [All Lists]

[S] median polish and kriging

To: s-news@wubios.wustl.edu
Subject: [S] median polish and kriging
From: "Mike Tobin" <tobi0009@tc.umn.edu>
Date: Tue, 26 Jan 1999 10:37:24
Sender: owner-s-news@wubios.wustl.edu
Dear S-news group,

     I recently began using S-plus.  I am running version 4.0 for Windows with 
the SpatialStats module attached.  I am currently trying to use geostatistics 
to characterize the spatial patterns of continuous data that I collected on a 
regular grid in several forest plots.  I have several questions and comments 
stemming from these attempts.

1.  In order to remove any large scale trends from the data, I employed the 
median polishing method using the twoway.formula function.  Included in the 
call to this function is the formula z ~ x * y.  Although the help file states 
that x represents the row variable and y represents the column variable, they 
appear to be reversed in the output.  Is this the only problem with this 
function?

2.  I used the residuals generated by median polishing to construct empirical 
variograms to which I fit theoretical variogram models.  I then generated 
kriging predictions at unsampled locations (all of this was accomplished using 
SpatialStats functions).  I used the results of the theoretical variogram 
fitting to define the covariance function used in the kriging.  Predictions 
generated in this way did not match those generated by the surf.gls/prmat 
functions of the spatial library provided by Venables and Ripley (MASS, ver: 
5.3; patchlevel 1999/01/10) or those generated by another kriging software 
package.  It appears that the effect of a nugget was not incorporated into the 
SpatialStats function.  As a partial fix, I wrote a new covariance function to 
pass to the SpatialStats krige function based on the one found in the V&R 
spatial library.  This appeared to bring these two functions into agreement, 
except for a few points for which SpatialStats generated anomalous extreme 
predictions (cases in which the predicted point fell very close to a 
measurement point).

Will changing the covariance function serve as a general method for 
incorporating a nugget effect into the SpatialStats function or are there cases 
in which this will lead to errors?
Why are the anomalous extreme predictions being generated by the SpatialStats 
functions?
Is there a way to correct this problem?
For either function, what would the covariance function be for a linear 
variogram model that incorporates a nugget effect (both error variance and 
microscale variance)?

3.  Finally, in order to correct for skewness, I log transformed my data prior 
to doing any of the above analyses.  In order to back-transform the values I 
obtained from kriging, I am following the formula presented by N. A. C. Cressie 
in Statistics for Spatial Data (1993) on p.g. 135 that includes a value for the 
Lagrange multiplier.

Is there a way to extract this Lagrange multiplier value from the results of 
the SpatialStats krige or the V&R spatial surf.gls functions?
Do I need to make any similar corrections for bias in the back-transformation 
of the values predicted from the results of median polishing or can they be 
back-transformed simply before being added to the kriging predictions?

In closing, I would appreciate hearing about other possible problems I may run 
into as I continue these analyses or other possible approaches I might explore.
Thanks,

Mike Tobin
Graduate Student
Forest Resources Dept.
University of Minnesota
e-mail:  tobi0009@tc.umn.edu




-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] median polish and kriging, Mike Tobin <=