Find.Clusters.TS.ST2: Find.Clusters.TS.ST2

Description Usage Arguments Value Examples

View source: R/twostage_SpTm.R

Description

Find multiple (overlapping) cylindrical spatio-temporal clusters sequentially in the intercepts via two-stages detection (in the 2nd stage)

Usage

1
Find.Clusters.TS.ST2(yList, XList, long, lat, MR, M, Cls1st, overlap, alpha)

Arguments

yList

The input data (as a list of vectors).

XList

The input data (as a list of matrices).

long

longitude.

lat

latitude.

MR

Maximum radius.

M

Number of simulations.

Cls1st

Output from Find.Clusters.TS.ST1() function in the 1st Stage.

overlap

Boolean which is TRUE for overlapping clusters / FALSE for non-overlapping clusters.

alpha

Significance level

Value

List of clusters, coefficients, and indicator of cluster membership.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data("SE_FakeData_SpTm")
long <- SE_FakeData_SpTm$long
lat <- SE_FakeData_SpTm$lat
yList <-list()
yList[[1]] <- SE_FakeData_SpTm$y1
yList[[2]] <- SE_FakeData_SpTm$y2
yList[[3]] <- SE_FakeData_SpTm$y3
XList <-list()
XList[[1]] <- cbind(rep(1,length(long)), SE_FakeData_SpTm$x1)
XList[[2]] <- cbind(rep(1,length(long)), SE_FakeData_SpTm$x2)
XList[[3]] <- cbind(rep(1,length(long)), SE_FakeData_SpTm$x3)
MR <- 300
M <- 2
Clusters_ts1N <- Find.Clusters.TS.ST1(yList, XList, long, lat,
MR, M, overlap=FALSE, alpha=0.05)
Clusters_ts2N <- Find.Clusters.TS.ST2(yList, XList, long, lat,
MR, M, Cls1st=Clusters_ts1N, overlap=FALSE, alpha=0.05)

### With the Bonferroni correction
Clusters_ts1B <- Find.Clusters.TS.ST1(yList, XList, long, lat,
MR, M, overlap=FALSE, alpha=(0.05/2))
Clusters_ts2B <- Find.Clusters.TS.ST2(yList, XList, long, lat,
MR, M, Cls1st=Clusters_ts1B, overlap=FALSE, alpha=(0.05/2))

mkamenet3/coefclust documentation built on June 28, 2020, 10:41 a.m.