Last data update: 2014.03.03

R: Test of spatial variation in feedback and change-in-feedback
krige.testR Documentation

Test of spatial variation in feedback and change-in-feedback

Description

Randomization test to investigate spatial variation in a kriged index.

Usage

krige.test(krige.output, subregion, alternative, nb.rand, subregion.coverage=0.8)

Arguments

krige.output

a list of items corresponding to the output of the krige function.

subregion

a list of two vectors containing the lat/long coordinates of the vertices of a polygon. The polygon defines a subregion where one supposes variation in the predicted index krige.output$krige$predict.

x:

longitudes.

y:

latitudes.

alternative

a character string specifying the alternative hypothesis, must be one of "greater" or "less".

nb.rand

a positive integer specifying the number of randomizations (here, a randomization is a random translation on a torus).

subregion.coverage

a numeric value between zero and one specifying a criterion to accept a random translation (see Details). Default value is 0.8.

Details

The criterion to accept a random translation is a minimum coverage of subregion by the translated grid: the ratio between the number of nodes of the translated grid that are contained in subregion and the number of nodes of the original grid that are contained in subregion must be equal to or greater than subregion.coverage.

Value

an object from the KT.output class

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

krige, KT.output-class, rain.feedback.stats

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]

#### map of feedback index computed from the whole data series
stat1=rain.feedback.stats[["Feedback.whole.period"]]

#### variogram analysis and kriging of feedback index
## computer intensive stage
## Not run: 
par(mfrow=c(2,3), mar=c(5.1,4.1,4.1,2.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),
   variog.param=list(keep.distance=2/3,nb.bin=15,cov.pars=c(0.0008,10^6),
      nugget=0.0001,fix.nugget=FALSE,coordinates.scaling=10^5,statistic.scaling=0.01),
   krige.param=list(type.krige="ok",trend.d="1st"),plots=TRUE) 
## End(Not run)

#### test spatial variation in feedback index and plot test output
## computer intensive stage
## Not run: 
kt1=krige.test(krige.output=kr1,subregion=list(x=c(138,152,152,138),y=-c(40,40,33,33)),
   alternative="greater", nb.rand=2000)
par(mfrow=c(1,2), mar=c(5.1,4.1,4.1,2.1))	
plot(kt1,digits=list(predict=3,pvalue=3),breaks=12) 
## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FeedbackTS)
Error in library(FeedbackTS) : there is no package called 'FeedbackTS'
Execution halted