krige {FeedbackTS} | R Documentation |
Kriging function
Description
Variogram analysis and kriging prediction used to analyze feedback and
change-in-feedback across space. This function is
grounded on the function autoKrige
in the automap
package, grounded itself on the gstat
package.
Usage
krige(coordinates, statistic, grid, krige.param=NULL, plots=TRUE,
variog.param=list(npoints=50,nsim=99,plot.numbers=0.04))
Arguments
coordinates |
a 2-column matrix with latitudes and longitudes of observation sites. |
statistic |
a numeric vector specifying the values, at observation sites, of the statistic to be predicted. |
grid |
a list of arguments defining the grid over which the statistic is predicted:
|
krige.param |
a character string equal either to "x+y", "x" or "y" indicating whether the coordinates (and which coordinates) have to be accounted for in the trend in universal kriging; default is NULL, indicating that ordinary kriging without trend is performed. |
plots |
a logical indicating if plots characterizing the variogram analysis and the kriging prediction are produced (if |
variog.param |
a list of arguments used to display the variography, :
|
Details
If plots = TRUE
, four plots are produced. Plot 1:
Estimation of the semivariogram of the statistic (dots: sample
semivariogram; solid curve: theoretical semivariogram; dashed
curves: Monte-Carlo envelopes. Plot 2: Boxplots of kriging prediction (left) and kriging standard error (right). Plot 3: Kriging prediction. Plot 4: Kriging standard error.
Value
a list of items characterizing the variogram analysis and the kriging prediction:
input |
the list of arguments in the call of the |
MAP |
a list allowing to draw the border of the study region that can be made of several polygons. This is the output of the function |
grid |
a 2-column matrix providing the coordinates (in degrees) of the nodes of the prediction locations. |
in.region |
a logical vector indicating, for each grid node whose coordinates are given in the 2-column matrix |
krige |
a list providing the result the variography and the spatial prediction. This is the output of the function |
Note
The krige
function uses some of the functionalities of
the map
function in the maps
package, and of a few
functions in the gstat
and automap
package. To
fully exploit the functionalities of these external functions
(in particular autoKrige
), the krige
function should be extended.
Author(s)
Samuel Soubeyrand Samuel.Soubeyrand@avignon.inra.fr, Cindy E. Morris, E. Keith Bigg.
References
Soubeyrand, S., Morris, C. E. and Bigg, E. K. (2014). Analysis of fragmented time directionality in time series to elucidate feedbacks in climate data. Environmental Modelling and Software 61: 78-86.
See Also
rain.feedback.stats
, map
in the maps
package, autoKrige
and autofitVariogram
in the automap
package
Examples
#### load data of feedback and change-in-feedback indices in 88 sites across Australia
data(rain.feedback.stats)
#### spatial coordinates of the 88 sites
coord=rain.feedback.stats[,3:4]
#### feedback index
stat1=rain.feedback.stats[["Feedback.whole.period"]]
#### variogram analysis and kriging of feedback index
## computer intensive stage
## Not run:
par(mfrow=c(2,2), mar=c(5.1,4.1,4.1,4.1))
kr1=krige(coordinates=coord, statistic=stat1,
grid=list(x=seq(110,155,0.25),y=seq(-45,-11,0.25),border="Australia",
proj="+proj=lcc +lat_1=-18 +lat_2=-36 +lat0=-25 +lon_0=140",degrees=TRUE),
plots=TRUE)
## the plot style from the \code{automap} package can be obtained as follows:
plot(kr1$krige)
## End(Not run)