kpss_test | R Documentation |
Compute the Kwiatkowski–Phillips–Schmidt–Shin (KPSS) statistic for functional data.
kpss_test(
X,
method = c("simulation", "resample"),
resample_blocks = "separate",
M = 1000,
blocksize = 2 * ncol(X)^(1/5),
TVE = 1,
replace = TRUE,
return.info = FALSE
)
X |
A dfts object or data which can be automatically converted to that
format. See |
method |
String for the method in computing thresholds: Monte Carlo
simulation ( |
resample_blocks |
String indicating the type of resample test to use.
Using |
M |
Number of simulations to estimate theoretical distribution. |
blocksize |
Numeric for the block size when using a resample test. |
TVE |
Numeric for |
replace |
Boolean to indicate if blocks should be selected with replacement when using a resample test. |
return.info |
Boolean if all information on test statistic and null distribution should be returned or just the p-value (default). |
List with the following elements:
pvalue: p-value from the test.
statistic: test statistic computed on the data.
simulations: Theoretical values for the null distribution.
Chen, Y., & Pun, C. S. (2019). A bootstrap-based KPSS test for functional time series. Journal of Multivariate Analysis, 174, 104535.
Kokoszka, P., & Young, G. (2016). KPSS test for functional time series. Statistics, 50(5), 957-973.
kpss_test(generate_brownian_motion(100, v = seq(0, 1, length.out = 20)))
kpss_test(generate_brownian_motion(100, v = seq(0, 1, length.out = 20)),
method = "resample", resample_blocks = "overlapping"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.