Stata 15 help for dfactor_postestimation

[TS] dfactor postestimation -- Postestimation tools for dfactor

Postestimation commands

The following standard postestimation commands are available after dfactor:

Command Description ------------------------------------------------------------------------- estat ic Akaike's and Schwarz's Bayesian information criteria (AIC and BIC) estat summarize summary statistics for the estimation sample estat vce variance-covariance matrix of the estimators (VCE) estimates cataloging estimation results forecast dynamic forecasts and simulations lincom point estimates, standard errors, testing, and inference for linear combinations of coefficients lrtest likelihood-ratio test nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of coefficients predict predictions, residuals, influence statistics, and other diagnostic measures predictnl point estimates, standard errors, testing, and inference for generalized predictions test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses -------------------------------------------------------------------------

Syntax for predict

predict [type] {stub*|newvarlist} [if] [in] [, statistic options]

statistic Description ------------------------------------------------------------------------- Main y dependent variable, which is xbf + residuals xb linear predictions using the observable independent variables xbf linear predictions using the observable independent variables plus the factor contributions factors unobserved factor variables residuals autocorrelated disturbances innovations innovations, the observed dependent variable minus the predicted y ------------------------------------------------------------------------- These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only for the estimation sample.

options Description ------------------------------------------------------------------------- Options equation(eqnames) specify name(s) of equation(s) for which predictions are to be made rmse(stub*|newvarlist) put estimated root mean squared errors of predicted objects in new variables dynamic(time_constant) begin dynamic forecast at specified time

Advanced smethod(method) method for predicting unobserved states -------------------------------------------------------------------------

method Description ------------------------------------------------------------------------- onestep predict using past information smooth predict using all sample information filter predict using past and contemporaneous information -------------------------------------------------------------------------

Menu for predict

Statistics > Postestimation

Description for predict

predict creates a new variable containing predictions such as expected values, unobserved factors, autocorrelated disturbances, and innovations. The root mean squared error is available for all predictions. All predictions are also available as static one-step-ahead predictions or as dynamic multistep predictions, and you can control when dynamic predictions begin.

Options for predict

The mathematical notation used in this section is defined in Description of [TS] dfactor.

+------+ ----+ Main +-------------------------------------------------------------

y, xb, xbf, factors, residuals, and innovations specify the statistic to be predicted.

y, the default, predicts the dependent variables. The predictions include the contributions of the unobserved factors, the linear predictions by using the observable independent variables, and any autocorrelation.

xb calculates the linear prediction by using the observable independent variables.

xbf calculates the contributions of the unobserved factors plus the linear prediction by using the observable independent variables.

factors estimates the unobserved factors.

residuals calculates the autocorrelated residuals.

innovations calculates the innovations.

+---------+ ----+ Options +----------------------------------------------------------

equation(eqnames) specifies the equation(s) for which the predictions are to be calculated.

You specify equation names, such as equation(income consumption) or equation(factor1 factor2), to identify the equations. For the factors statistic, you must specify names of equations for factors; for all other statistics, you must specify names of equations for observable variables.

If you do not specify equation() and do not specify stub*, the results are the same as if you had specified the name of the first equation for the predicted statistic.

equation() may not be specified with stub*.

rmse(stub*|newvarlist) puts the root mean squared errors of the predicted objects into the specified new variables. The root mean squared errors measure the variances due to the disturbances but do not account for estimation error.

dynamic(time_constant) specifies when predict starts producing dynamic forecasts. The specified time_constant must be in the scale of the time variable specified in tsset, and the time_constant must be inside a sample for which observations on the dependent variables are available. For example, dynamic(tq(2008q4)) causes dynamic predictions to begin in the fourth quarter of 2008, assuming that your time variable is quarterly, see [D] datetime. If the model contains exogenous variables, they must be present for the whole predicted sample. dynamic() may not be specified with xb, xbf, innovations, smethod(filter), or smethod(smooth).

+----------+ ----+ Advanced +---------------------------------------------------------

smethod(method) specifies the method used to predict the unobserved states in the model. smethod() may not be specified with xb.

smethod(onestep), the default, causes predict to use previous information on the dependent variables. The Kalman filter is performed on previous periods, but only the one-step predictions are made for the current period.

smethod(smooth) causes predict to estimate the states at each time period using all the sample data by the Kalman smoother.

smethod(filter) causes predict to estimate the states at each time period using previous and contemporaneous data by the Kalman filter. The Kalman filter is performed on previous periods and the current period. smethod(filter) may be specified only with factors and residuals.

Examples

Setup . webuse dfex . dfactor (D.(ipman income hours unemp) = , noconstant ar(1)) (f = , ar(1/2))

Forecast changes in ipman 6 months into the future, using dynamic predictions starting in December 2008, and then graph the series . tsappend, add(6) . predict Dipman_f, dynamic(tm(2008m12)) equation(D.ipman) . tsline D.ipman Dipman_f if month>=tm(2008m1), xtitle("") legend(rows(2))

Predict and graph the unobserved factor along with changes in ipman . predict fac if e(sample), factor . tsline D.ipman fac, lcolor(gs10) xtitle("") legend(rows(2))


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index