Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

addwmfs

Adds wavelet mean field information to a clust object


Description

When a clust object is created, the wmfs slot is NA. This function fills it in.

Usage

addwmfs(obj)

Arguments

obj

An object of class clust

Details

This function uses the values of scale.min, scale.max.input, sigma and f0 stored in obj$methodspecs. It is possible to create a clust object with bad values for these slots. This function throws an error in that case. You can use a correlation-based method for calculating the synchrony matrix and still pass values of scale.min, scale.max.input, sigma and f0 to clust (in fact, this happens by default) - they won't be used by clust, but they will be there for later use by addwmfs and addwpmfs.

Value

addwmfs returns another clust object with wmfs slot now included. If obj$wmfs was not NA, the object is returned as is.

Author(s)

Daniel Reuman, reuman@ku.edu

See Also

clust, addwpmfs, browseVignettes("wsyn")

Examples

sig<-matrix(.8,5,5)
diag(sig)<-1
lents<-50
if (requireNamespace("mvtnorm",quietly=TRUE))
{
  dat1<-t(mvtnorm::rmvnorm(lents,mean=rep(0,5),sigma=sig))
  dat2<-t(mvtnorm::rmvnorm(lents,mean=rep(0,5),sigma=sig))
}else
{
  dat1<-t(matrix(rep(rnorm(lents),times=5),lents,5))
  dat2<-t(matrix(rep(rnorm(lents),times=5),lents,5))
}
dat<-rbind(dat1,dat2)
times<-1:lents
dat<-cleandat(dat,times,clev=1)$cdat
coords<-data.frame(Y=rep(0,10),X=1:10)
method<-"coh.sig.fast"
clustobj<-clust(dat,times,coords,method,nsurrogs = 100)
res<-addwmfs(clustobj)

wsyn

Wavelet Approaches to Studies of Synchrony in Ecology and Other Fields

v1.0.3
GPL-3
Authors
Daniel C. Reuman [aut, cre], Thomas L. Anderson [aut], Jonathan A. Walter [aut], Lei Zhao [aut], Lawrence W. Sheppard [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.