help prais dialog: prais
also see: prais postestimation
-------------------------------------------------------------------------------
Title
[TS] prais -- Prais-Winsten and Cochrane-Orcutt regression
Syntax
prais depvar [indepvars] [if] [in] [, options]
options description
-------------------------------------------------------------------------
Model
rhotype(regress) base rho on single-lag OLS of residuals; the
default
rhotype(freg) base rho on single-lead OLS of residuals
rhotype(tscorr) base rho on autocorrelation of residuals
rhotype(dw) base rho on autocorrelation based on Durbin-Watson
rhotype(theil) base rho on adjusted autocorrelation
rhotype(nagar) base rho on adjusted Durbin-Watson
corc use Cochrane-Orcutt transformation
ssesearch search for rho that minimizes SSE
twostep stop after the first iteration
noconstant suppress constant term
hascons has user-defined constant
savespace conserve memory during estimation
SE/Robust
vce(vcetype) vcetype may be ols, robust, cluster clustvar, hc2,
or hc3
Reporting
level(#) set confidence level; default is level(95)
nodw do not report the Durbin-Watson statistic
display_options control spacing and display of omitted variables
and base and empty cells
Optimization
optimize_options control the optimization process; seldom used
+ coeflegend display coefficients' legend instead of coefficient
table
-------------------------------------------------------------------------
+ coeflegend does not appear in the dialog box.
You must tsset your data before using prais; see [TS] tsset.
indepvars may contain factor variables; see fvvarlist.
depvar and indepvars may contain time-series operators; see tsvarlist.
by, rolling, and statsby are allowed; see prefix.
See [TS] prais postestimation for features available after estimation.
Menu
Statistics > Time series > Prais-Winsten regression
Description
prais uses the generalized least-squares method to estimate the
parameters in a linear regression model in which the errors are serially
correlated. Specifically, the errors are assumed to follow a first-order
autoregressive process.
Options
+-------+
----+ Model +------------------------------------------------------------
rhotype(rhomethod) selects a specific computation for the autocorrelation
parameter rho, where rhomethod can be
regress rho_reg = B from the residual regression e_t = B *
e_(t-1)
freg rho_freg = B from the residual regression e_t = B *
e_(t+1)
tscorr rho_tscorr = e'e_(t-1)/e'e, where e is the vector of
residuals
dw rho_dw = 1 - dw/2, where dw is the Durbin-Watson d
statistic
theil rho_theil = rho_tscorr * (N - k)/N
nagar rho_nagar = (rho_dw * N^2 + k^2)/(N^2 - k^2)
The prais estimator can use any consistent estimate of rho to
transform the equation, and each of these estimates meets that
requirement. The default is regress, which produces the minimum
sum-of-squares solution (ssesearch option) for the Cochrane-Orcutt
transformation -- none of these computations will produce the minimum
sum-of-square solution for the full Prais-Winsten transformation.
corc specifies that the Cochrane-Orcutt transformation be used to
estimate the equation. With this option, the Prais-Winsten
transformation of the first observation is not performed, and the
first observation is dropped when estimating the transformed
equation.
ssesearch specifies that a search be performed for the value of rho that
minimizes the sum-of-squared errors of the transformed equation
(Cochrane-Orcutt or Prais-Winsten transformation). The search method
is a combination of quadratic and modified bisection searches using
golden sections.
twostep specifies that prais stop on the first iteration after the
equation is transformed by rho -- the two-step efficient estimator.
Although iterating these estimators to convergence is customary, they
are efficient at each step.
noconstant; see [R] estimation options.
hascons indicates that a user-defined constant, or a set of variables
that in linear combination forms a constant, has been included in the
regression. For some computational concerns, see the discussion in
[R] regress.
savespace specifies that prais attempt to save as much space as possible
by retaining only those variables required for estimation. The
original data are restored after estimation. This option is rarely
used and should be used only if there is insufficient space to fit a
model without the option.
+-----------+
----+ SE/Robust +--------------------------------------------------------
vce(vcetype) specifies the type of standard error reported, which
includes types that are derived from asymptotic theory, that are
robust to some kinds of misspecification, and that allow for
intragroup correlation; see [R] vce_option.
vce(ols), the default, uses the standard variance estimator for
ordinary least-squares regression.
prais also allows the following:
vce(hc2) and vce(hc3) specify an alternative bias correction for the
vce(robust) variance calculation; for more information, see [R]
regress. You may specify only one of vce(hc2), vce(hc3), or
vce(robust).
All estimates from prais are conditional on the estimated value of
rho. Robust variance estimates here are robust only to
heteroskedasticity and are not generally robust to misspecification
of the functional form or omitted variables. The estimation of the
functional form is intertwined with the estimation of rho, and all
estimates are conditional on rho. Thus estimates cannot be robust to
misspecification of functional form. For these reasons, it is
probably best to interpret vce(robust) in the spirit of White's
original paper on estimation of heteroskedastic-consistent covariance
matrices.
+-----------+
----+ Reporting +--------------------------------------------------------
level(#); see [R] estimation options.
nodw suppresses reporting of the Durbin-Watson statistic.
display_options: noomitted, vsquish, noemptycells, baselevels,
allbaselevels; see [R] estimation options.
+--------------+
----+ Optimization +-----------------------------------------------------
optimize_options: iterate(#), [no]log, tolerance(#). iterate()
specifies the maximum number of iterations. log/nolog specifies
whether to show the iteration log. tolerance() specifies the
tolerance for the coefficient vector; tolerance(1e-6) is the default.
These options are seldom used.
The following option is available with prais but is not shown in the
dialog box:
coeflegend; see [R] estimation options.
Examples
---------------------------------------------------------------------------
Setup
. webuse idle
. tsset t
Perform Prais-Winsten AR(1) regression
. prais usr idle
Perform Cochrane-Orcutt AR(1) regression
. prais usr idle, corc
Same as above, but request robust standard errors
. prais usr idle, corc vce(robust)
---------------------------------------------------------------------------
Setup
. webuse qsales
Perform Cochrane-Orcutt AR(1) regression and search for rho that
minimizes SSE
. prais csales isales, corc ssesearch
Replay result with 99% confidence interval
. prais, level(99)
---------------------------------------------------------------------------
Saved results
prais saves the following in e():
Scalars
e(N) number of observations
e(N_gaps) number of gaps
e(mss) model sum of squares
e(df_m) model degrees of freedom
e(rss) residual sum of squares
e(df_r) residual degrees of freedom
e(r2) R-squared
e(r2_a) adjusted R-squared
e(F) F statistic
e(rmse) root mean squared error
e(ll) log likelihood
e(N_clust) number of clusters
e(rho) autocorrelation parameter rho
e(dw) Durbin-Watson d statistic for transformed
regression
e(dw_0) Durbin-Watson d statistic for untransformed
regression
e(rank) rank of e(V)
e(tol) target tolerance
e(max_ic) maximum number of iterations
e(ic) number of iterations
Macros
e(cmd) prais
e(cmdline) command as typed
e(depvar) name of dependent variable
e(title) title in estimation output
e(clustvar) name of cluster variable
e(cons) noconstant or not reported
e(method) twostep, iterated, or SSE search
e(tranmeth) corc or prais
e(rhotype) method specified in rhotype() option
e(vce) vcetype specified in vce()
e(vcetype) title used to label Std. Err.
e(properties) b V
e(predict) program used to implement predict
e(marginsok) predictions allowed by margins
e(asbalanced) factor variables fvset as asbalanced
e(asobserved) factor variables fvset as asobserved
Matrices
e(b) coefficient vector
e(V) variance-covariance matrix of the estimators
e(V_modelbased) model-based variance
Functions
e(sample) estimation sample
Also see
Manual: [TS] prais
Help: [TS] prais postestimation;
[TS] arima, [R] regress, [R] regress postestimation time series,
> [TS] tsset