The SSM Procedure

Example 34.11 Panel Data: Dynamic Panel Model for the Cigar Data

(View the complete code for this example.)

This example shows how you can use the SSM procedure to specify and fit the so-called dynamic panel model, which is commonly used to analyze a panel of time series. Suppose that a panel of time series follows the model

where t denotes the time index (for example, ); i denotes the panel index (for example, ); is the autoregression coefficient; denote the panel-specific intercepts; are observations on a regression variable with regression coefficient (the same for all panels); are unobserved, random time effects; and are the observation errors. The sequences and are assumed to be independent, zero-mean Gaussian variables with variances and , respectively. This is an example of a dynamic panel model that contains one regressor variable. It is easy to formulate this model equation as a state equation with state of size P—the number of panels. Taking , it is easy to see that the states evolve according to the equation

where (a P-dimensional, diagonal matrix with all its diagonal elements equal to ); is a -dimensional matrix (in a block form) of state regression variables, where the first block is a column that includes all the values that are associated with a given time index (t) and the second block is a P-dimensional identity matrix; is the -dimensional column vector of regression coefficients; and is a P-dimensional column vector of all the disturbances that are associated with time index t. Because and are independent, the covariance matrix of —for example, —is easy to calculate: . This formulation can be easily extended to multiple regression variables, such as variables, by appropriately modifying the term that is associated with the state regression variables—: the new matrix becomes -dimensional and the new regression vector becomes -dimensional.

The cross-sectional data, Cigar, that are used in the section Getting Started: SSM Procedure are reused in this example. In order to use the SSM procedure to perform the dynamic panel model–based analysis, the input data set must be reorganized so that it contains the variables that form the -dimensional matrix . For the Cigar data, the number of panels (the number of regions considered in the study), and the number of regression variables . Therefore, the input data set needs to be augmented by variables that constitute the matrix —the first -dimensional block contains the values of the three regression variables, lprice, lndi, and lpimin, at a given time index (a particular year in this case). The following DATA steps accomplish this task in two steps. In the first step, the raw data that form the rows of the Cigar data set are read into a temporary data set, Tmp, such that all 6*46 = 276 values that are associated with a given year (values of six variables—year, region, lsales, lprice, lndi, and lpimin for 46 panels in a given year) are read in a single row that consists of 276 columns. In the second step, the final input data set is formed by rearranging Tmp so that it contains the necessary variables in the proper order—year (the time index), region (the panel index), lsales (the response variable), and the variables that form the -dimensional matrix (w1, …, w2254).

data Tmp;
    input u1-u276;
datalines;
63 1 4.54223 3.35341 7.3514 3.26194
63 2 4.82831 3.17388 7.5729 3.21487
63 3 4.63860 3.29584 7.3000 3.25037

   ... more lines ...   

data cigar(keep=year region lsales w1-w2254);
   array wmat{46, 49} w1-w2254;
   array ivar{46, 6} u1-u276;
   set tmp;
   year = intnx( 'year', '1jan63'd, u1-63 );
   format year year.;
   do i=1 to 46;
      region = ivar[i, 2];
      lsales = ivar[i, 3];
      do j=1 to 46;
          do k=1 to 49;
              wmat[j,k] = 0;
              if k = j+3 then wmat[j,k] = 1;
              if k=1 then wmat[j,k] = ivar[j, 4];
              if k=2 then wmat[j,k] = ivar[j, 5];
              if k=3 then wmat[j,k] = ivar[j, 6];
          end;
      end;
      output;
   end;
run;

The following statements specify and fit the dynamic panel model:

 proc ssm data=Cigar opt(tech=dbldog maxiter=75);
     id year interval=year;
     parms rho / lower=-0.9999 upper=0.9999;
     parms sigma0 sigma1 / lower=1.e-8;
     array RegionArray{46} region1-region46;
     do i=1 to 46;
        RegionArray[i] = (region=i);
     end;
     array cov{46,46};
     do i=1 to 46;
         do j=1 to 46;
            if(i=j) then cov[i,j] = sigma0 + sigma1;
            else cov[i,j] = sigma1;
         end;
     end;
     state panelState(46) T(I)=(rho) W(g)=(w1-w2254)
       cov(g)=(cov) a1(46) checkbreak;
     comp dynPanel = (RegionArray)*panelState;
     model lsales = dynPanel;
     output out=for1 press;
 run;

The estimates of the regression coefficients and the regional intercepts, which are all statistically significant, are shown in Output 34.11.1. In particular, the estimated coefficients of lprice, lndi, and lpimin, are –0.26, 0.13, and 0.07, respectively.

Output 34.11.1: Estimates of , , and the Regional Intercepts

The SSM Procedure

Estimate of the State Equation Regression Vector
StateElement IndexEstimateStandard
Error
t ValuePr > |t|
panelState1-0.26270.0178-14.79<.0001
panelState20.13400.013010.30<.0001
panelState30.07480.01983.780.0002
panelState40.42650.05817.35<.0001
panelState50.38250.06056.32<.0001
panelState60.44250.05827.61<.0001
panelState70.34710.06315.50<.0001
panelState80.36860.06355.81<.0001
panelState90.43570.06147.10<.0001
panelState100.37530.06555.73<.0001
panelState110.42490.06067.01<.0001
panelState120.41850.06046.92<.0001
panelState130.38240.06026.35<.0001
panelState140.39420.06446.12<.0001
panelState150.41540.06266.64<.0001
panelState160.39610.06106.49<.0001
panelState170.37650.06186.10<.0001
panelState180.45280.06087.44<.0001
panelState190.43160.05867.36<.0001
panelState200.43570.06017.25<.0001
panelState210.37710.06395.90<.0001
panelState220.39390.06296.26<.0001
panelState230.41220.06216.64<.0001
panelState240.39490.06056.52<.0001
panelState250.43860.05657.77<.0001
panelState260.41180.06276.57<.0001
panelState270.38980.06046.45<.0001
panelState280.38180.06136.23<.0001
panelState290.43430.06326.87<.0001
panelState300.46190.06257.39<.0001
panelState310.37300.06365.86<.0001
panelState320.37840.05896.43<.0001
panelState330.38250.06256.12<.0001
panelState340.37840.05986.32<.0001
panelState350.40930.06286.52<.0001
panelState360.41550.05976.96<.0001
panelState370.39600.06156.44<.0001
panelState380.40750.06026.77<.0001
panelState390.40450.05866.91<.0001
panelState400.39180.05996.55<.0001
panelState410.43500.06087.16<.0001
panelState420.40070.06026.65<.0001
panelState430.31960.05975.36<.0001
panelState440.43370.06097.12<.0001
panelState450.37900.06345.98<.0001
panelState460.37670.06186.10<.0001
panelState470.43920.05977.36<.0001
panelState480.39320.06036.51<.0001
panelState490.39380.06166.40<.0001


Output 34.11.2 shows the estimates of the autoregression coefficient , the observation error variance , and the variance of the time effect (variance of ) .

Output 34.11.2: Estimates of , , and

Estimates of Named Parameters
ParameterEstimateStandard
Error
t Value
rho0.8316790.012433866.89
sigma00.0012310.000049125.08
sigma10.0002130.00006623.22


Finally, you can compare the fit of the dynamic panel model with the fit of the model that is discussed in the section Getting Started: SSM Procedure. Output 34.11.3 shows the likelihood-based information criteria for the dynamic panel model, and Output 34.11.4 shows the same information for the other model.

Output 34.11.3: Likelihood-Based Information Criteria: Dynamic Panel Model

Information Criteria
StatisticDiffuse Likelihood
Based
Profile Likelihood
Based
AIC (lower is better)-4732.722-4856.398
BIC (lower is better)-4717.247-4343.874
AICC (lower is better)-4732.704-4841.250
HQIC (lower is better)-4726.913-4664.667
CAIC (lower is better)-4714.247-4245.874


Output 34.11.4: Likelihood-Based Information Criteria: Getting Started Example

Information Criteria
StatisticDiffuse Likelihood
Based
Profile Likelihood
Based
AIC (lower is better)-4488.093-4145.246
BIC (lower is better)-4477.776-3637.952
AICC (lower is better)-4488.084-4130.417
HQIC (lower is better)-4484.220-3955.472
CAIC (lower is better)-4475.776-3540.952


Similarly, Output 34.11.5 shows fit criteria based on the delete-one cross validation error for the dynamic panel model, and Output 34.11.6 shows the same information for the other model.

Output 34.11.5: Delete-One Cross Validation Criteria: Dynamic Panel Model

Delete-One Cross Validation Error Criteria
VariableNPRESSGeneralized Cross-Validation
lsales13801.1153095.62798E-7


Output 34.11.6: Delete-One Cross Validation Criteria: Getting Started Example

Delete-One Cross Validation Error Criteria
VariableNPRESSGeneralized Cross-Validation
lsales13801.2904206.18144E-7


On the basis of both these considerations, the dynamic panel model appears to provide a better fit for the Cigar data than the model that is fit in the section Getting Started: SSM Procedure.