Lab 2: A simulation study in geoR
Today's computing exercise is to design and implement a simulation
study of variogram estimation methods. To do so, you need to generate
data from a Gaussian random field with a covariance function of your
choice, estimate the parameters in different ways, and compare the
estimators. You may want to generate the data at the same points as the
Parana data set in geoR. Be careful with how you choose the parameters
of your simulation, so that there is a reasonable level of covariance
over most of the range of the coordinates.
Projects might consider addressing one or more of the following:
- for your chosen covariance model, compare estimation with
at least two different spatial sample sizes (for example, a random
subsample of the Parana sites, or even the Parana sites supplemented by
additional random sites).
- for each sample size, compare estimates when you fit the true
model and when you fit a covariance model different from the one you
used to generate the data.
- conduct simulations for at least two different sets of
parameters, perhaps one model with relatively small, or even no,
nugget, and one with a relatively large nugget (relative to the sill).
- generate simulated Gaussian random fields with and without a
large scale spatial trend (e.g. a polynomial in the coordinates), and
carry out variogram estimation in both cases, with and without
accounting for a spatial trend (a total of 4 scenarios: simulation with
and without trend; estimation with and without accounting for trend).
I suggest working in groups of two or three (Steve: you may want to
work with the group at UBC-V. You should be able to exchange computer
images etc using the system). A written report of at most 3 pages (not
including code which can go in an appendix) is due by Feb 5. Let me
know if you need more time to work on the project--we could spend some
time next Thursday as well if needed.
The following functions may be useful:
grf simulates a Gaussian random
field
variofit estimates parameters
using least squares
likfit estimates parameters
using likelihood
krige.bayes estimates
parameters using Bayesian methods
There are also plotting tools, such as
plot.grf plots empirical
variogram from grf simulations
lines.variomodel.* adds
appropriate (according to *) variogram lines to plots
Here .* can be .grf, .krige.bayes, .likGRF, .variofit or nothing
plot.krige.bayes plots prior
and posterior distributions from krige.bayes