Description Usage Arguments Details Value Author(s) See Also Examples
When a clust object is created, the wpmfs slot is NA. This function fills it in,
or adds to it.
1 2 3 4 5 6 |
obj |
An object of class |
level |
The clustering level(s) to use. 1 corresponds to no clustering. The default is all levels of clustering. |
sigmethod |
Method for significance testing the |
nrand |
The number of randomizations to be used for significance testing |
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.
addwpmfs returns another clust object with wpmfs slot now included,
or more filled in than it was previously. With values of sigmethod other than
"quick", this function can be slow, particularly with large nrand. So in that
case the user may want to set level equal only to one clustering level of interest.
Unlike wmf, old values in obj$wpmfs are overwritten.
Daniel Reuman, reuman@ku.edu
clust, addwmfs, browseVignettes("wsyn")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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<-addwpmfs(clustobj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.