Elliott-Rothenberg-Stock unit root test
resers=ers(namey,p,l,arg1,...,argn)
* 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
* p = order of time polynomial in the null-hypothesis
- p = 0, for constant term
- p = 1, for constant plus time-trend
* l = # of lags of the ERS test
* 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
* rers = a results tlist with:
- resers('meth') = 'ers'
- resers('y') = y data vector of the auxiliary regression
- resers('x') = x data matrix of the auxiliary regression
- resers('nobs') = # observations
- resers('nvar') = # variables
- resers('beta') = bhat
- resers('yhat') = yhat
- resers('resid') = residuals of the auxiliary regression
- resers('vcovar') = estimated variance-covariance matrix of beta
- resers('sige') = estimated variance of the residuals
- resers('sigu') = sum of squared residuals
- resers('ser') = standard error of the regression
- resers('tstat') = t-stats
- resers('pvalue') = pvalue of the betas
- resers('dw') = Durbin-Watson Statistic
- resers('condindex') = multicolinearity cond index
- resers('prescte') = boolean indicating the absence of a constant in the regression
- resers('pvaluef') = its significance level
- resers('test p-value') = the (approximate) p-value of the test
- resers('prests') = boolean indicating the presence or absence of a time series in the regression
- resers('namey') = name of the y variable of the auxiliary regression
- resers('namex') = name of the x variables of the auxiliary regression
- resers('bounds') = if there is a timeseries in the regression, the bounds of the regression
- resers('like') = log-likelihood of the regression
- resers('dropna') = boolean indicating if NAs have been droped
- resers('nonna') = vector indicating position of non-NA values (if the option 'dropna' was active)
load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat') ; bounds('1964q1','1989q2') ers('ly',1,4) ers('delts(ly)',0,4) // Example taken from function ers_d. The nature of series ly is asserted, first by testing if it is trend-stationary // (the result is negative), then if its first difference is level-stationary (the result is positive). // 4 lags of the first difference of the tested variable are introduced. | ![]() | ![]() |