Fields is a collection of programs for curve and function
fitting with an emphasis on spatial data and spatial statistics. The
major methods implemented include cubic and thin plate splines,
universal
Kriging and Kriging for large data sets. One main feature is any
covariance function implemented in R code can be used for spatial prediction. Another important feature is that fields will take advantage of compactly supported covariance functions in a seamless way through
the spam package. See library( help=fields)
for a listing of all the
fields contents. fields stives to have readable and tutorial code. Take a look at the
source code for Krig
and mKrig
to see how things work
"under the hood".
To load fields with the comments retained in the source
use keep.source = TRUE
in the library
command.
We also keep the source on-line:
browse the directory
http://www.image.ucar.edu/~nychka/Fields/Source for commented source.
http://www.image.ucar.edu/~nychka/Fields/Help/00Index.html is a
page for html formatted help files. (If you obtain the source version of the
package (file ends in .gz) the commented source code is the R subdirectory.)
Major methods
Tps
Thin Plate spline
regression (including GCV)Krig
Spatial process estimation
(Kriging) including support for conditional simulation.
The Krig function allows you to supply a covariance function that is
written in native R code. See (stationary.cov
) that includes
several families of covariances and distance metrics including the
Matern and great circle distance.
mKrig
(micro Krig) arefastTps
fast efficient Universal Kriging and spline-like functions, that can take advantage of sparse covariance
functions and thus handle very large numbers of spatial locations.LatticeKrig
is an experimental function that uses a multiresolution basis
and CAR on basis coefficients for fixed rank Kriging. This is designed to handle
large spatial datasets but with long range covariance functions.Other noteworthy functions
vgram
andvgram.matrix
finds variograms for spatial data (and
with temporal replications.cover.design
Generates space-filling designs where the distance
function is expresed in R code.as.image
,image.plot
,drape.plot
,quilt.plot
add.image
,crop.image
,half.image
,average.image
,designer.colors
,color.scale
,in.poly
Many
convenient functions for working with image data and rationally (well,
maybe reasonably) creating and placing a color scale on an image plot.
See alsohelp(grid.list)
for how fields works with grids andUS
andworld
for adding a map quickly.sreg
,qsreg
splint
Fast 1-D smoothing
splines and 1-D
quantile/robust and interpolating cubic splines.
Generic functions that support the methods
plot
- diagnostic plots of fit
summary
- statistical summary of fit
print
- shorter version of summary
surface
- graphical display of fitted surface
predict
- evaluation fit at arbitrary points
predict.se
- prediction standard errors at arbitrary points.
sim.rf
- Simulate a random fields on a 2-d grid.
Getting Started
Try some of the examples from help files for Tps
or
Krig
.
Graphics tips
help( fields.hints)
gives some R code tricks for setting up common legends and axes.
And has little to do with this package!
Testing
See help(fields.tests)
for testing fields.
Some fields datasets
CO2
Global satelite CO2 concentrations (simulated field)RCMexample
Regional climate model outputlennon
Image of John LennonCOmonthlyMet
Monthly mean temperatures and precip for ColoradoRMelevation
Digital elevations for the Rocky Mountain Empireozone2
Daily max 8 hour ozone concentrations for the US midwest
for summer 1987.PRISMelevation
Digital elevations for the
continental US at approximately 4km resolutionrat.diet
Small paired study on rat food intake over time.WorldBankCO2
Demographic and carbon emission data
for 75 countries and for 1999.
DISCLAIMER:
This is software for statistical research and not for commercial uses. The
authors do not guarantee the correctness of any function or program in
this package. Any changes to the software should not be made without the
authors permission.