How does KPSSTEST function actually work?

Hi all, I'm using the built-in MATLAB function kpsstest to do stationary test for an input sequence, but I find the output is not as expected. I paste the results as bellow. My questions are: (1) why x = [1 1] is rejected while x = [1 1 1] is accepted? (2) why x = ones(1, 10^6) is rejected while x = zeros(1, 10^6) is accepted?
>> x = [0 0]; >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0
>> x = [0 1]; >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0
>> x = [1 0]; >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0
>> x = [1 1]; >> kpsstest(x, 'alpha', .01, 'trend', false)
*ans =
1*
>> x = [1 1 1]; >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0
>> x = [1 1 1 1]; >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0
>> x = ones(1, 10^6); >> kpsstest(x, 'alpha', .01, 'trend', false)
*ans =
1*
>> x = zeros(1, 10^6); >> kpsstest(x, 'alpha', .01, 'trend', false)
ans =
0

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Programming 的更多信息

提问:

Yu
2013-2-15

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by