Description Usage Arguments Details Value References See Also Examples
View source: R/permutationTest.R
Calculates a threshold for the Subspace Method via a permutation test as described in \insertCiteGrundy2020;textualchangepoint.cov
1 | permutationTest(X, subspaceDim, msl = dim(X)[2], alpha = 0.05, nperm = 200)
|
X |
Data matrix of dimension n by p. |
subspaceDim |
Dimension of the latent subspace. |
msl |
Minimum segment length between changepoints. Note this should be greater than or equal to p |
alpha |
Significance level of test |
nperm |
Number of random permutations to be performed |
This function works by generating the specified number of permutations of the original data set and running the Subspace method on each permutation in order to get samples from the distribution of the test statistic.
Numeric containing the threshold value
Grundy2020changepoint.cov
1 2 3 4 | set.seed(1)
data <- subspaceDataGeneration(n=100,p=20,subspaceDim=5,tau=50)$data
ans <- permutationTest(X=data,subspaceDim=5,msl=20,nperm=100)
ans
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.