KPSS unit root test
[result]=kpss(namey,t,l)
* namey= a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes
* t= order of time polynomial in the null-hypothesis
- t = 0, for constant term
- t = 1, for constant plus time-trend
* l= (optional) truncation lag of the Newey-West window (default: l = floor(5*nobs^0.25))
* arg1,...,argn = optional arguments which can be:
- 'noprint' if the user doesn't want to print the results of the regression
- 'dropna' if the user wants to remove the NA values from the data
* results = a results tlist with:
- result('meth') = 'kpss'
- result('namey') = namey
- result('y') = y
- result('t') = t
- result('lag(N_W)') = l
- result('test_value') = lm
- result('prests') = prests
- result('bounds') = bounds
- result('dropna') = boolean indicating if NAs have been droped
- result('nonna') = vector indicating position of non-NA values (if the option 'dropna' was active)
load(GROCERDIR+'/data/bdhenderic.dat'); bounds('1964q3','1989q2'); kpss('lm1',0) kpss('lm1',1) // Examples taken from function kpss_d. Provide KPSS test for variable lm1 taken from data base hendryericsson, // with no time trend and a simple time trend respectively. | ![]() | ![]() |