-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the stat_tests_correlated_climdata wiki!
#Multivariate tests for autocorrelated data
Significance tests for autocorrelated data (modified t-test and moving blocks bootstrapping) and two field significance tests to be used with the modified t-test (Walkers test and False discovery rate). The moving blocks bootstrapping also includes a test for field significance.
##Details:
- Package: multVarTestAutocorr
- Type: Package
- Version: 1.0
- Date: 2016-02-23
- License: GPL-2
This package contains four main functions, modTtest3d, mbbTest, walkerTest and fdrTest. All functions are designed for spatial data (longitude x latitude). modTtest3d and mbbTest need multiple timesteps while walkerTest and fdrTest can have multiple time steps but do not need to also work with longitude x latitide data only .
##Author: Ruth Lorenz
email: ruthl.lorenz22@gmail.com
##References: Zwiers and von Storch, 1995, Taking serial correlation into account in tests of the mean, J. Clim, 8, p. 336--351.
Wilks, D.S., 1997, Resampling Hypothesis Tests for Autocorrelated Fields, J. Clim., 10, p.65--82.
Wilks, D.S., 2006, On "Field Significance" and the False Discovery Rate, J. Appl. Meteorol. Climatol., 45, p. 1181--1189.
##Examples:
x<-array(NA,dim=c(20,50,31))
y<-array(NA,dim=c(20,50,31))
for (lon in 1:20){
for (lat in 1:50){
#create timeseries with AR(1) correlation
x[lon,lat,]<-arima.sim(list(ar = 0.3),n=31,rand.gen=rnorm,sd=0.1,mean=0)
y[lon,lat,]<-arima.sim(list(ar = 0.3),n=31,rand.gen=rnorm,sd=0.1,mean=0)
}
}
test3d<-modTtest3d(x,y,alternative = c("two.sided"),conf.level=0.95)
print(test3d)
walk<-walker.test(test3d$p.value, siglev=0.05)
print(walk)
fdr<-fdr.test(test3d$p.value, siglev=0.05)
print(fdr)
mbb <- mbbTest(x,y,siglev=0.05,nb=10,verbose=FALSE)
print(mbb)