This example shows how you can fit the REGCOMPONENT models in Bell (2011) by using the SSM procedure. The following DATA
step generates the data used in the last example of this article (Example 6: “Modeling a time series with a sampling error component”). The variable y
in this data set contains monthly values of the VIP series (value of construction put in place), a U.S. Census Bureau publication
that measures the value of construction installed or erected at construction sites during a given month. The values of y
are known to be contaminated with heterogeneous sampling errors; the variable hwt
in the data set is a proxy for this sampling error in the log scale. The variable hwt
is treated as a weight variable for the noise component in the model.
data test; input y hwt; date = intnx('month', '01jan1997'd, _n_1 ); format date date.; logy = log(y); label logy = 'Log value of construction put in place'; datalines; 115.2 0.042 110.4 0.042 111.5 0.067 127.9 0.122 150.0 0.129 149.5 0.135 139.5 0.152 144.6 0.168 176.0 0.173 ... more lines ...
The article proposes the following model for the log VIP series:

where follows an ARIMA(0,1,1)(0,1,1) model and is a zeromean, AR(2) error process. The following statements specify this model for logy
:
proc ssm data=test; id date interval=month; trend airlineTrend(arma(d=1 sd=1 q=1 sq=1 s=12)); trend ar2Noise(arma(p=2)) cross=(hwt); model logy = airlineTrend ar2Noise; output outfor=for; run;
Output 27.6.1: Estimates of the ARIMA Components Model
Model Parameter Estimates  

Component  Type  Parameter  Estimate  Standard Error 
airlineTrend  ARMA Trend  Error Variance  0.000768  0.00717 
airlineTrend  ARMA Trend  MA_1  0.342128  0.38575 
airlineTrend  ARMA Trend  SMA_1  0.999000  9.30218 
ar2Noise  ARMA Trend  Error Variance  0.410905  0.09947 
ar2Noise  ARMA Trend  AR_1  0.484630  0.06758 
ar2Noise  ARMA Trend  AR_2  0.439580  0.23570 
The ARIMA(0,1,1)(0,1,1) trend is named airlineTrend
and the zeromean, AR(2) error process is named ar2Noise
. See the TREND statement for more information about the ARIMA notation. The estimates of model parameters are shown in Output 27.6.1. These estimates are different from the estimates given in the article; however, the estimated trend and noise series are
qualitatively similar. The article uses an estimation procedure that consists of a sequence of alternating steps in which
one subset of parameters is held fixed and the remaining parameters are estimated by MLE in each step. This process continues
until all the estimates stabilize. The SSM procedure estimates all the parameters simultaneously by MLE.
The following statements produce the plot of the estimate of the airlineTrend
component (shown in Output 27.6.2). This plot is very similar to the trend plot shown in the article (the article plots are in the antilog scale).
proc sgplot data=for; title "Smoothed Estimate of the ARIMA(0,1,1)(0,1,1)12 Trend"; series x= date y=smoothed_airlineTrend; scatter x= date y=logy; run;
Output 27.6.2: Estimate of the airlineTrend
Component
The following statements produce the plot of the estimate of the ar2Noise
component (shown in Output 27.6.3). This plot is also very similar to the noise plot shown in the article (once again, the article plots are in the antilog
scale).
proc sgplot data=for; title "Smoothed Estimate of the AR(2) Noise"; series x= date y=smoothed_ar2Noise; refline 0; run;
Output 27.6.3: Estimate of the ar2Noise
Component