PANEL Procedure

Example 25.3 Analyzing Demand for Liquid Assets: Random Effects

(View the complete code for this example.)

Feige (1964) provides data on the demand for liquid assets. The data are for six states and the District of Columbia (CA, DC, FL, IL, NY, TX, and WA) and were collected each year from 1949 to 1959. All variables are log-transformed.

The following statements create the Assets data set:

data Assets;
   length state $ 2;
   input state $ year d t s y rd rt rs;
   label d  = 'Per Capita Demand Deposits'
         t  = 'Per Capita Time Deposits'
         s  = 'Per Capita S&L Association Shares'
         y  = 'Permanent Per Capita Personal Income'
         rd = 'Service Charge on Demand Deposits'
         rt = 'Interest on Time Deposits'
         rs = 'Interest on S&L Association Shares';
datalines;
CA   1949  6.2785  6.1924  4.4998  7.2056 -1.0700  0.1080  1.0664
CA   1950  6.4019  6.2106  4.6821  7.2889 -1.0106  0.1501  1.0767
CA   1951  6.5058  6.2729  4.8598  7.3827 -1.0024  0.4008  1.1291
CA   1952  6.4785  6.2729  5.0039  7.4000 -0.9970  0.4492  1.1227
CA   1953  6.4118  6.2538  5.1761  7.4200 -0.8916  0.4662  1.2110
CA   1954  6.4520  6.2971  5.3613  7.4478 -0.6951  0.4756  1.1924

   ... more lines ...   

The data contain per capita consumptions for three liquid assets: demand deposits such as checking, time deposits, and savings and loan (S&L) shares. Because all variables vary over time, you can use a fixed-effects model. However, the demand of liquid assets is likely to be influenced by many macro variables that are not specific to a particular state, and therefore the errors might be correlated between states. As a result, you posit a linear model for per capita demand deposits, with random effects for states.

The following statements fit a one-way random-effects model:

proc sort data = Assets;
   by state year;
run;

proc panel data = Assets;
   id state year;
   model d = y rd rt rs / ranone;
run;

The regression results are provided in Output 25.3.1.

The "Variance Component Estimates" table provides the estimated variance of the cross-sectional (state) effects and the variance of the observation-level errors. A majority of the overall error variance can be attributed to differences between states, not differences within states.

The "Hausman Test for Random Effects" table shows the result of a Hausman specification test. The null hypothesis is that state effects can be treated as random (random-effects model) and that they do not need to be estimated directly (fixed-effects model). The test results favor the random-effects specification that is used to generate this output.

Output 25.3.1: Demand for Demand Deposits, One-Way Random-Effects Model

The PANEL Procedure
Fuller and Battese Variance Components (RanOne)
 
Dependent Variable: d (Per Capita Demand Deposits)

Model Description
Estimation Method RanOne
Number of Cross Sections 7
Time Series Length 11

Fit Statistics
SSE 0.0968 DFE 72
MSE 0.0013 Root MSE 0.0367
R-Square 0.7669    

Variance Component Estimates
Variance Component for Cross Sections 0.029067
Variance Component for Error 0.00134

Hausman Test for Random Effects
Coefficients DF m Value Pr > m
4 4 3.21 0.5227

Parameter Estimates
Variable DF Estimate Standard
Error
t Value Pr > |t| Label
Intercept 1 -1.74258 0.6805 -2.56 0.0125 Intercept
y 1 1.148051 0.0998 11.51 <.0001 Permanent Per Capita Personal Income
rd 1 -0.27514 0.0514 -5.36 <.0001 Service Charge on Demand Deposits
rt 1 0.033718 0.0295 1.14 0.2566 Interest on Time Deposits
rs 1 -0.41036 0.1202 -3.42 0.0011 Interest on S&L Association Shares


The parameter estimate for the variable Y is greater than 1, indicating that demand is elastic to income—income has a more than proportional positive association with the demand for demand deposits. The coefficient on the variable RD indicates that demand deposits increase significantly as the service charge is reduced.

The variables RT and RS represent positive aspects of competing products, and you would expect these variables to affect demand negatively. The coefficient for RS meets that expectation, but the coefficient for RT is not significant.

The previous analysis used the default Fuller-Battese method to estimate the variance components. The PANEL procedure supports three other methods, and you might be interested in how use of the different methods affects the analysis.

The following statements fit the model by using all four methods and include a COMPARE statement to compare the results:

proc panel data = Assets;
   id state year;
   wh: model d = y rd rt rs / ranone vcomp = wh;
   wk: model d = y rd rt rs / ranone vcomp = wk;
   fb: model d = y rd rt rs / ranone vcomp = fb;
   nl: model d = y rd rt rs / ranone vcomp = nl;
   compare / mstat(varcs varerr);
run;

The tables that the COMPARE statement produces are shown in Output 25.3.2.

Output 25.3.2: One-Way versus Two-Way Random Effects, Assets Data

The PANEL Procedure
Model Comparison
 
Dependent Variable: d (Per Capita Demand Deposits)

Comparison of Model Statistics
Statistic WH
RanOne
WK
RanOne
FB
RanOne
NL
RanOne
Var due to Cross Sections 0.0315 0.0315 0.0291 0.0327
Var due to Error 0.000107 0.001340 0.001340 0.001149

Comparison of Model Parameter Estimates
Variable   WH
RanOne
WK
RanOne
FB
RanOne
NL
RanOne
Intercept
Estimate
Std Err
-1.472425
0.719067
-1.723092
0.681184
-1.742581
0.680541
-1.680406
0.682676
y
Estimate
Std Err
1.117252
0.099799
1.145844
0.099776
1.148051
0.099761
1.141001
0.099802
rd
Estimate
Std Err
-0.245861
0.052260
-0.272995
0.051445
-0.275135
0.051372
-0.268325
0.051600
rt
Estimate
Std Err
0.029227
0.028570
0.033397
0.029416
0.033718
0.029485
0.032692
0.029266
rs
Estimate
Std Err
-0.414540
0.117486
-0.410731
0.119968
-0.410361
0.120160
-0.411500
0.119548


You conclude that how you estimate variance components has little bearing on the regression results.

It is possible that there are time random effects in addition to random effects for states. To explore this possibility, you fit a two-way random-effects model and again use a COMPARE statement to conveniently compare the one- and two-way models:

proc panel data = Assets;
   id state year;
   model d = y rd rt rs / ranone rantwo;
   compare;
run;

The model comparison table is shown in Output 25.3.3. Although the parameter estimates differ somewhat, your interpretation of the effects on demand remains unchanged.

Output 25.3.3: Comparison of Variance-Component Methods, Assets Data

The PANEL Procedure
Model Comparison
 
Dependent Variable: d (Per Capita Demand Deposits)

Comparison of Model Parameter Estimates
Variable   Model 1
RanOne
Model 1
RanTwo
Intercept
Estimate
Std Err
-1.742581
0.680541
-1.236056
0.725222
y
Estimate
Std Err
1.148051
0.099761
1.064058
0.104018
rd
Estimate
Std Err
-0.275135
0.051372
-0.290940
0.052646
rt
Estimate
Std Err
0.033718
0.029485
0.039388
0.027761
rs
Estimate
Std Err
-0.410361
0.120160
-0.326618
0.114046


Last updated: June 19, 2025