Find.Clusters.TStg2: Find.Clusters.TStg2

Description Usage Arguments Value Examples

View source: R/twostage.R

Description

Find multiple clusters sequentially via Simulataneous detection. Find and test the cluster in the simple linear regression for given potential centroids via the 2nd stage in Two-stage detection: the same slope but different intercept.

Usage

1
Find.Clusters.TStg2(y, X, long, lat, MR, M, Cls1st, overlap, alpha)

Arguments

y

The input data(as a vector)

X

The input data(as a matrix)

long

longitude

lat

latitude

MR

Maximum radius

M

number of simulations

Cls1st

the output from Find.Clusters.TStg1 in the 1st-Stage

overlap

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

alpha

significance level

Value

list of cluster, coefficient, and indicator of cluster membership.

Examples

1
2
3
4
5
6
7
data("SE_FakeData")
y <- SE_FakeData$y
X <- cbind(rep(1,length(y)), SE_FakeData$x)
long <- SE_FakeData$long; lat <- SE_FakeData$lat
MR <- 300; M <- 2
Clusters_ts1 <- Find.Clusters.TStg1(y, X, long, lat, MR, M, overlap=TRUE, alpha=0.05)
Clusters_ts2 <- Find.Clusters.TStg2(y, X, long, lat, MR, M, Clusters_ts1, overlap=TRUE, alpha=0.05)

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