.- help for ^arima^ (manual: ^[R] arima^) .- Autoregressive integrated moving average models ----------------------------------------------- Basic syntax for a regression/structural model with ARMA disturbances: ^arima^ depvar [varlist]^,^ ^ar(^numlist^)^ ^ma(^numlist^)^ Basic syntax for an ARIMA(p,d,q) model: ^arima^ depvar^,^ ^arima(^#p^,^#d^,^#q^)^ Full syntax: ^arima^ depvar [varlist] [weight] [^if^ exp] [^in^ range] [^,^ ^ar(^numlist^)^ ^ma(^numlist^)^ ^arima(^#p^,^#d^,^#q^)^ ^noc^onstant ^c^onstraints^(^numlist^)^ ^hes^sian ^opg^ ^r^obust ^sc^ore^(^newvarlist|stub^*)^ ^di^ffuse ^p0(^#|matname^)^ ^state0(^#|matname^)^ ^cond^ition ^save^space ^det^ail ^l^evel^(^#^)^ maximize_options ^from(^initial_values^)^ ^gtol^erance^(^#^)^ ^bhhh^ ^bfgs^ ^dfp^ ^nr^ ^bhhhb^fgs^(^#^,^#^)^ ^bhhhd^fp^(^#^,^#^)^ ] ^arima^ is for use with time-series data. You must ^tsset^ your data before using ^arima^; see help @tsset@. depvar and varlist may contain time-series operators; see help @varlist@. ^iweight^s are allowed, see help @weights@. ^arima^ shares the features of all estimation commands; see help @est@. The syntax of @predict@ following ^arima^ is ^predict^ [type] newvarname [^if^ exp] [^in^ range] [^,^ statistic ^d^ynamic^(^time_constant^)^ ^str^uctural ^t0(^time_constant^)^ ] where statistic is ^xb^ predicted values for the model -- the differenced series; the default ^y^ fitted values in y -- the undifferenced series ^mse^ mean square error of the prediction ^xb^ ^r^esiduals residuals or predicted innovations ^yr^esiduals residuals or predicted innovations in y -- the undifferenced series and time_constant is a # or a time literal such as ^d(1jan1995)^ or ^q(1995q1)^, etc.; see help @tfcn@. These statistics are available both in and out of sample; type ^predict^ ... ^if e(sample)^ ... if wanted only for the estimation sample. Description ----------- ^arima^ estimates a model of depvar on varlist where the disturbances are allowed to follow a linear autoregressive moving-average (ARMA) specification. The dependent and independent variables may be differenced or seasonally differ- enced to any degree. When independent variables are not specified, these models reduce to autoregressive integrated moving-average (ARIMA) models in the dependent variable. Missing data are allowed and are handled using the Kalman filter and methods outlined in ^[R] arima^. Referring to the full syntax, depvar is the variable being modeled and the structural or regression part of the model is specified in varlist. The options ^ar()^ and ^ma()^ are used to specify the lags of autoregressive and moving-average terms respectively. ^arima^ allows time-series operators in the dependent variable and independent variable lists and it is often convenient to make extensive use of these opera- tors. Options ------- ^ar(^numlist^)^ specifies the autoregressive terms to be included in the model. These are the autoregressive terms of the structural model disturbance. ^ma(^numlist^)^ specifies the moving average terms to be included in the model. These are the terms for the lagged innovations -- white noise disturbances. ^arima(^#p^,^#d^,^#q^)^ is an alternate, shorthand notation for specifying models that are autoregressive in the dependent variable. The dependent variable and any independent variables are differenced #d times, 1 through #p lags of autocorrelations are included, and 1 through #q lags of moving averages are included. ^noconstant^ suppresses the constant term (intercept) in the structural model. ^constraints(^numlist^)^ specifies the constraint numbers of the linear constraints to be applied during estimation; see help @constraint@. The default is to perform unconstrained estimation. ^hessian^ and ^opg^ specify how standard errors are to be calculated. The default is ^opg^ unless one of the options ^bfgs^, ^dfp^, or ^nr^ is specified, in which case the default is ^hessian^. ^hessian^ specifies that the standard errors and coefficient covariance mat- rix be estimated from the full Hessian. ^opg^ specifies that the standard errors and coefficient covariance matrix be estimated using the outer product of the coefficient gradients with respect to the observation likelihoods. ^robust^ specifies that the Huber/White/sandwich estimator of variance is to be used in place of the traditional calculation; see ^[U] 23.11 Obtaining^ ^robust variance estimates^. For state-space models in general and ARIMA in particular, the robust or quasi-maximum likelihood estimates (QMLE) of variance are robust to sym- metric nonnormality in the disturbances -- including, as a special case, heteroscedasticity. The robust variance estimates are not in general robust to functional misspecification of the structural or ARMA components of the model. ^score(^newvarlist|stub^*)^ creates a new variable for each parameter in the model. Each new variable contains the derivative of the model log-likelihood with respect to the parameter for each observation in the estimation sample. If ^score(^newvarlist^)^ is specified, the newvarlist must contain a new var- iable for each parameter in the model. If ^score(^stub^*)^ is specified, var- iables named stub# are created for each parameter in the model; where the trailing "^*^" in stub is replaced by the parameter number. The newvarlist is filled, or the #'s in stub# are created in the order in which the esti- mated parameters are reported in the estimation result table. Unlike scores for most other models, the scores from ^arima^ are individual gradients of the log likelihood with respect to the variables, not with respect to X*b. ^diffuse^ specifies that a diffuse prior be used as a starting point for the Kalman filter recursions. Using ^diffuse^, nonstationary models may be esti- mated with ^arima^ (also see option ^p0()^ below; ^diffuse^ is equivalent to specifying ^p0(1e9)^). See ^[R] arima^ for details. ^p0(^#|matname^)^ is a rarely specified option that can be used for nonstationary series or when an alternate prior for starting the Kalman recursions is desired; see ^[R] arima^ for details. ^state0(^#|matname^)^ is a rarely used option that specifies an alternate initial state vector for starting the Kalman filter recursions; see ^[R] arima^. ^condition^ specifies that conditional rather than full maximum likelihood esti- mates be produced. This estimation method is not appropriate for nonsta- tionary series, but may be preferable for long series or for models that have one or more long AR or MA lags. ^diffuse^, ^p0()^, and ^state0()^ may not be specified with ^condition^. See ^[R] arima^ for details. When ^condition^ is specified, estimation is performed by the ^arch^ command, see help @arch@, and more control of the estimation process can be obtained by using ^arch^ directly. ^savespace^ specifies that memory use be conserved by retaining only those vari- ables required for estimation. The original data is restored after estima- tion. This option is rarely used. ^detail^ specifies that a detailed list of any gaps in the series be reported. These include gaps due to missing observations or missing data for the dependent variable or independent variables. ^level(^#^)^ specifies the confidence level, in percent, for confidence intervals of the coefficients; see help @level@. maximize_options control the maximization process; see help @maximize@. The following options are all related to maximization and are either par- ticularly important in estimating ARIMA models or are not available for most other estimators. ^from(^initial_values^)^ allows the starting values of the model coefficients to be set by the user; see help @maximize@. The standard syntax for ^from()^ accepts a matrix, a list of values, or coefficient name value pairs. In addition, ^arima^ accepts ^from(armab0)^ and this specifies that the starting value for all ARMA parameters in the model be set to zero prior to optimization. ^gtolerance(^#^)^ is a rarely used maximization option that specifies a threshold for the relative size of the gradient; see help @maximize@. The default gradient tolerance for ^arima^ is .05. ^bhhh^, ^dfp^, ^bfgs^, ^nr^, ^bhhhbfgs()^, ^bhhhdfp()^ specify how the likelihood function is to be maximized. ^bhhhbfgs(5,10)^ is the default. See ^[R] arima^ for details. Options for @predict@ ------------------- ^xb^, the default, calculates the predictions from the model. If ^D.^depvar is the dependent variable, these predictions are of ^D.^depvar and not depvar. ^y^ specifies that predictions of depvar are to be made even if the model was specified in terms of, say, ^D.^depvar. ^mse^ calculates the MSE of ^xb^. ^residuals^ calculates the residuals. If no other options are specified, these are the predicted innovations, i.e., they include the ARMA component. If option ^structural^ is specified, these are the residuals from the structural equation; see ^structural^ below. ^yresiduals^ calculates the residuals in terms of depvar, even if the model was specified in terms of, say, ^D.^depvar. As with ^residuals^, the ^yresiduals^ are computed from the model including any ARMA component. If option ^structural^ is specified, any ARMA component is ignored and ^yresiduals^ are the residuals from the structural equation; see ^structural^ below. ^structural^ specifies that the calculation is to be made considering the struc- tural component only, ignoring the ARMA terms, thus producing the steady- state equilibrium predictions. ^dynamic(^time_constant^)^ specifies how lags of y in the model are to be handled. If ^dynamic()^ is not specified, actual values are used everywhere lagged values of y appear in the model to produce one-step ahead forecasts. ^dynamic(^time_constant^)^ produces dynamic (also known as recursive) fore- casts. time_constant specifies when the forecast is to switch from one- step ahead to dynamic. In dynamic forecasts, references to y evaluate to the prediction of y for all periods at or after time_constant; they evaluate to the actual value of y for all prior periods. ^t0(^time_constant^)^ specifies the starting point for the recursions to compute the predicted statistics; disturbances are assumed to be 0 for t < ^t0()^. The default is to set ^t0()^ to the minimum t observed in the estimation sample meaning that observations prior to that are assumed to have distur- bances of 0. ^t0()^ is irrelevant if ^structural^ is specified. Examples -------- . ^arima wpi, arima(1,1,1)^ . ^arima D.wpi, ar(1) ma(1)^ (same as above) . ^arima D.wpi, ar(1) ma(1 4)^ (add quarterly MA effect) . ^arima wpi, arima(3,2,4)^ (ARIMA -- p=3, d=2, q=4) . ^arima D2.wpi, ar(1/3) ma(1/4)^ (same as above) . ^arima consump m2 if tin( , 1981q4), ar(1) ma(1) robust^ Also see -------- Manual: ^[U] 23 Estimation and post-estimation commands^, ^[U] 29 Overview of model estimation in Stata^, ^[R] arima^ On-line: help for @est@, @postest@, @time@, @tsset@; @ac@, @arch@, @corrgram@, @pac@, @pergram@, @prais@, @regress@, @wntestb@, @wntestq@