| wlmtest {wsyn} | R Documentation |
Statistical comparison of wavelet linear models
Description
Compares a wavelet linear model with a nested model. Also the generator function for
the wlmtest class.
Usage
wlmtest(wlmobj, drop, sigmethod, nrand = 1000)
Arguments
wlmobj |
A |
drop |
Either names or indices of variables in |
sigmethod |
Method for significance testing. One of " |
nrand |
The number of randomizations to do for significance |
Details
The slot signif provides the core information on significance.
If sigmethod is not "fast", then signif$coher is the same as
wlmobj$coher, and signif$scoher is a matrix of dimensions nrand by
length(signif$coher) with rows equal to coherences between refitted models and the
response-variable transforms, for datasets where the variables specified in drop have
been replaced by surrogates. Normalization as specified in norm is used. The type
of surrogate used (Fourier surrogates or amplitude adjusted Fourier surrogates, see
surrog) is determined by sigmethod ("fft" or "aaft").
Synchrony-preserving surrogates are used. A variety of statements of significance (or lack
thereof) can be made by comparing signif$coher with signif$scoher (see the
plotmag, plotrank, and bandtest methods
for the wlmtest class). If sigmethod is
"fast", a fast algorithm of Lawrence Sheppard is used which is a generalization
to wavelet linear models of the fast algorithm for coherence described in Sheppard et al (2017).
In that case
signif$coher can be compared to signif$scoher to make significance
statements about the coherence in exactly the same way, but signif$coher will no
longer precisely equal wlmobj$coher, and wlmobj$coher should not be compared
directly to signif$scoher. Statements about significance of the coherence
should be made using signif$coher and signif$scoher, whereas wlmobj$coher
should be used whenever the actual value of the coherence is needed.
The slots ranks and bandp are empty on an initial call to wlmtest.
They are made to compute and hold
aggregate significance results over any timescale band of choice. These are filled in
when needed by other methods, see plotrank and bandtest.
Value
wlmtest returns an object of class wlmtest. Slots are:
wlmobj |
The input |
drop |
The input |
signif |
A list with information from the significance testing. Elements are
|
ranks |
A list with ranking information for |
bandp |
A data frame containing results of computing significances across
timescale bands. Empty on an initial call to |
Author(s)
Thomas Anderson, anderstl@gmail.com, Jon Walter, jaw3es@virginia.edu; Lawrence Sheppard, lwsheppard@ku.edu; Daniel Reuman, reuman@ku.edu
References
Sheppard, L.W., et al. (2016) Changes in large-scale climate alter spatial synchrony of aphid pests. Nature Climate Change. DOI: 10.1038/nclimate2881
Sheppard, L.W., et al. (2017) Rapid surrogate testing of wavelet coherences. European Physical Journal, Nonlinear and Biomedical Physics, 5, 1. DOI: 10.1051/epjnbp/2017000
Sheppard, LW et al. (2019) Synchrony is more than its top-down and climatic parts: interacting Moran effects on phytoplankton in British seas. Plos Computational Biology 15, e1006744. doi: 10.1371/journal.pcbi.1006744
See Also
wlm, plotrank, bandtest, coh,
wlmtest_methods, browseVignettes("wsyn")
Examples
times<-1:30
dat<-list(v1=matrix(rnorm(300),10,30),v2=matrix(rnorm(300),10,30),v3=matrix(rnorm(300),10,30),
v4=matrix(rnorm(300),10,30),v5=matrix(rnorm(300),10,30))
dat<-lapply(FUN=function(x){cleandat(x,times,1)$cdat},X=dat)
resp<-1
pred<-2:3
norm<-"powall"
wlmobj<-wlm(dat,times,resp,pred,norm)
drop<-3
sigmethod<-"fft"
res<-wlmtest(wlmobj,drop,sigmethod,nrand=10)