Coder Social home page Coder Social logo

stat_tests_correlated_climdata's Introduction

stat_tests_correlated_climdata

Statistical tests for temporally autocorrelated and/or spatially correlated data. Implemented for climate model output (3 dimesions: time, lat, lon).

Functions for modified t-test (effective sample size t-test), two field significance tests (Walkers test and False Discovery Rate, can be used with modified t-test) and moving blocks bootstrap. The moving blocks bootstrap also includes a test for field significance.

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.

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.

Example: 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)

stat_tests_correlated_climdata's People

Contributors

ruthlorenz avatar

Stargazers

Nikolina Mileva avatar YOGESH KUMKAR avatar Ales Kuchar avatar

Watchers

James Cloos avatar  avatar

Forkers

lmxb yangxhcaf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.