SPUNIT Procedure |
@SPUNIT computes the Schmidt-Phillips(1992) test for a unit root. This is an LM test for unit root around a polynomial trend allowing for the chosen trend under both the null and the alternative. It does a non-parametric correction for serial correlation beyond the first lag that is tested. Because the test result can depend upon that correction, a table of values is produced. @LSUNIT is a generalization to allow for one or more breaks.
The model takes the form:
\({y_t} = {D_t}\theta + {x_t},{x_t} = \rho {x_{t - 1}} + {v_t}\)
where \({D_t}\) has deterministic terms \(1,t, \ldots ,{t^p}\) allowing for powers up to \(p=4\), though, in practice there is little call for anything beyond a linear trend. As a Lagrange Multiplier test, it starts by estimating the model under the null of \(\rho = 1\) which converts the model to the form
\(\Delta {y_t} = \Delta {D_t}\theta + {v_t}\)
(which, in effect, converts a degree \(p\) polynomial to degree \(p-1\).) The test statistic is a corrected version of the t statistic on the detrended lagged level \(y_{t - 1}^*\) (this is called SBAR{1} in the output) in
\(\Delta {y_t} = (\rho - 1)y_{t - 1}^* + \Delta {D_t}{\theta ^*} + {v_t}\)
The correction is for the serial correlation is \(v\) which is done with a Bartlett (Newey-West) long-run variance calculation. The resulting test statistic is sensitive to the number of lags used in that, so the procedure produces a sensitivity table showing the statistic for different values—typically, that will stabilize once the number of lags is adequate.
@SPUNIT( options ) series start end
Wizards
This is included as one of the tests in the Time Series—Unit Root Test Wizard.
Parameters
|
series |
series to analyze |
|
start end |
range of series to use (not range over which test is run). By default, the defined range of series. |
Options
P=maximum polynomial trend order considered (1 to 4) [1]
This is designed differently from the DET option on other unit root tests as the test is designed for series with trends (possibly beyond linear). Note that the test doesn't not allow for non-trending data.
LAGS=(maximum) # of lags in the lag windows for long-run variance
The default is Schwert's \(12{\left( {T/100} \right)^{.25}}\)
[PRINT]/NOPRINT
TITLE="title for report" ["Schmidt-Phillips Test for a Unit Root in xxxx"]
Variables Defined
|
%CDSTAT |
Test statistic |
Example
This does a test on log per capita real GNP from the Nelson-Plosser data set.
open data "nelsonplosser.rat"
calendar(a) 1860:1
data(format=rats) 1860:01 1970:01 realgnp nomgnp realgnppc ip employment $
unemprate gnpdefl cpi nomwages realwages m2 velocity bonds stockprice
*
set logpcrgnp = log(realgnppc)
@spunit(lags=10) logpcrgnp
Sample Output
The LM Test Auxiliary Regression part has the coefficients and t-statistics on the auxiliary regression—the only part of this that actually matters is the SBAR{1} line. The t-statistic on that is computed with no correction for the long-run variance. The sensitivity table shows how that varies depending upon the lags used in the lag window. All the values are above the 10% critical value, so you would not reject the unit root null.
Schmidt-Phillips Test (TAU) for a Unit Root in LOGPCRGNP
Regression Run From 1910:01 to 1970:01
Observations 61
Null of unit root. Reject in left tail.
Signif. Level Critical Value
1%(**) -3.630
2.5% -3.320
5%(*) -3.060
10% -2.770
LM Test Auxiliary Regression
Variable Coefficient T-Stat
SBAR{1} -0.11624 -1.908
Constant 0.00346 0.326
Semiparametric Corrections for TAU
Bartlett Window Estimates of sigma^2
Schwert value of L4 =3, L12=10
Lags Sigma^2 tau
0 0.003952 -1.908
1 0.005397 -2.230
2 0.006088 -2.368
3 0.006175 -2.385
4 0.005940 -2.339
5 0.005573 -2.266
6 0.005344 -2.219
7 0.005246 -2.198
8 0.005121 -2.172
9 0.004865 -2.117
10 0.004514 -2.039
Copyright © 2025 Thomas A. Doan