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

Risposte (0)

Categorie

Scopri di più su Programming in Centro assistenza e File Exchange

Richiesto:

Yu
il 15 Feb 2013

Community Treasure Hunt

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

Start Hunting!

Translated by