CPANEL Procedure

Example 11.2 Analyzing Demand for Liquid Assets: Random Effects

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 table. These statements assume that your libref is named mylib, but you can substitute any appropriately defined libref.

data mylib.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. 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 cpanel data =  mylib.Assets;
   id state year;
   model d = y rd rt rs / ranone;
run;

The regression results are provided in Output 11.2.1.

The "Variance Component Estimates" table provides the estimated variances and standard deviations for the cross-sectional (state) effects in addition to the overall 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 11.2.1: Demand for Demand Deposits, One-Way Random-Effects Model

The CPANEL Procedure
One-Way Random Effects (RanOne)
Swamy and Arora Variance Components
Dependent Variable: d (Per Capita Demand Deposits)

Model Description
Estimation MethodRanOne
Variance EstimationModel Based
Data SetASSETS
Number of Observations77
Number of Cross Sections7
Time Series Length11

Fit Statistics
SSE0.0939DFE72
MSE0.0013Root MSE0.0361
R-Square0.7651  

Variance Component Estimates
SourceVarianceStandard
Deviation
Cross Sections0.0463940.215393
Error0.001340.036608

Hausman Test For Random Effects
CoefficientsDFm ValuePr > m
441.520.8235

Parameter Estimates
VariableDFEstimateStandard
Error
t ValuePr > |t|Label
Intercept1-1.643250.6841-2.400.0189Intercept
y11.1367760.099811.39<.0001Permanent Per Capita Personal Income
rd1-0.264280.0517-5.11<.0001Service Charge on Demand Deposits
rt10.0320760.02911.100.2746Interest on Time Deposits
rs1-0.412130.1192-3.460.0009Interest 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 Swamy-Arora method to estimate the variance components. The CPANEL procedure supports four other methods, and you might be interested in how the different methods affect the analysis.

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

proc cpanel data =  mylib.Assets;
   id state year;
   sa: model d = y rd rt rs / ranone vcomp = sa;
   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 produced by the COMPARE statement are provided in Output 11.2.2.

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

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

Comparison of Model Statistics
StatisticSA
RanOne
WH
RanOne
WK
RanOne
FB
RanOne
NL
RanOne
Var due to Cross Sections0.04640.03150.03150.02910.0327
Var due to Error0.0013400.0001070.0013400.0013400.001149

Comparison of Model Parameter Estimates
Variable SA
RanOne
WH
RanOne
WK
RanOne
FB
RanOne
NL
RanOne
Intercept
Estimate
Std Err
-1.643246
0.684144
-1.472425
0.719067
-1.723092
0.681184
-1.742581
0.680541
-1.680406
0.682676
y
Estimate
Std Err
1.136776
0.099816
1.117252
0.099799
1.145844
0.099776
1.148051
0.099761
1.141001
0.099802
rd
Estimate
Std Err
-0.264276
0.051729
-0.245861
0.052260
-0.272995
0.051445
-0.275135
0.051372
-0.268325
0.051600
rt
Estimate
Std Err
0.032076
0.029138
0.029227
0.028570
0.033397
0.029416
0.033718
0.029485
0.032692
0.029266
rs
Estimate
Std Err
-0.412126
0.119181
-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.

Last updated: July 09, 2026