Functional KPSS Test
kpss_test.Rd
Compute the Kwiatkowski–Phillips–Schmidt–Shin (KPSS) statistic for functional data.
Arguments
- X
A dfts object or data which can be automatically converted to that format. See
dfts()
.- method
String for the method in computing thresholds: Monte Carlo simulation (
simulation
) or resampling (resample
).- resample_blocks
String indicating the type of resample test to use. Using
separate
gives blocks which are separate whileoverlapping
creates overlapping or sliding windows. Whenblocksize=1
then these will be identical.- M
Number of simulations to estimate theoretical distribution.
- blocksize
Numeric for the block size when using a resample test.
- TVE
Numeric for
pca()
to select the number of principle components.- 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).
Value
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.
References
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.
Examples
kpss_test(generate_brownian_motion(100, v = seq(0, 1, length.out = 20)))
#> $pvalue
#> [1] 0.616
#>
kpss_test(generate_brownian_motion(100, v = seq(0, 1, length.out = 20)),
method = "resample", resample_blocks = "overlapping"
)
#> $pvalue
#> [1] 0.441
#>