CPANEL Procedure

Example 11.3 Panel Study of Income Dynamics (PSID): Hausman-Taylor Models

Cornwell and Rupert (1988) analyze data from the Panel Study of Income Dynamics (PSID), an income study of 595 individuals over the seven-year period, 1976–1982 inclusive. Of particular interest is the effect of additional schooling on wages. The analysis here replicates that of Baltagi (2013, sec. 7.5), where it is surmised that covariate correlation with individual effects makes a standard random-effects model inadequate.

The following statements create the PSID data. These statements assume that your libref is named mylib, but you can substitute any appropriately defined libref.

data mylib.psid;
   input id t lwage wks south smsa ms exp exp2 occ ind union fem blk ed;
   label id    = 'Person ID'
         t     = 'Time'
         lwage = 'Log of wages'
         wks   = 'Weeks worked'
         south = '1 if resides in the South'
         smsa  = '1 if resides in SMSA'
         ms    = '1 if married'
         exp   = 'Years full-time experience'
         exp2  = 'exp squared'
         occ   = '1 if blue-collar occupation'
         ind   = '1 if manufacturing'
         union = '1 if union contract'
         fem   = '1 if female'
         blk   = '1 if black'
         ed    = 'Years of education';
datalines;
1    1  5.5606799126  32  1  0  1  3   9     0  0  0  0  0  9
1    2  5.7203102112  43  1  0  1  4   16    0  0  0  0  0  9
1    3  5.9964499474  40  1  0  1  5   25    0  0  0  0  0  9
1    4  5.9964499474  39  1  0  1  6   36    0  0  0  0  0  9
1    5  6.0614600182  42  1  0  1  7   49    0  1  0  0  0  9
1    6  6.1737899780  35  1  0  1  8   64    0  1  0  0  0  9
1    7  6.2441701889  32  1  0  1  9   81    0  1  0  0  0  9
2    1  6.1633100510  34  0  0  1  30  900   1  0  0  0  0  11
2    2  6.2146100998  27  0  0  1  31  961   1  0  0  0  0  11
2    3  6.2634000778  33  0  0  1  32  1024  1  1  1  0  0  11
2    4  6.5439100266  30  0  0  1  33  1089  1  1  0  0  0  11
2    5  6.6970300674  30  0  0  1  34  1156  1  1  0  0  0  11
2    6  6.7912201881  37  0  0  1  35  1225  1  1  0  0  0  11
2    7  6.8156399727  30  0  0  1  36  1296  1  1  0  0  0  11

   ... more lines ...   

You begin by fitting a one-way random-effects model:

proc cpanel data =  mylib.psid;
   id id t;
   model lwage = wks south smsa ms exp exp2 occ
                           ind union fem blk ed / ranone;
run;

The output is shown in Figure 2. The coefficient on the variable ED (which represents years of education) estimates that an additional year of schooling is associated with about a 10% increase in wages. However, the results of the Hausman test for random effects show a serious violation of the random-effects assumptions, namely that the regressors are independent of the individual effects.

Figure 2: One-Way Random Effects Estimation

The CPANEL Procedure
One-Way Random Effects (RanOne)
Swamy and Arora Variance Components
Dependent Variable: lwage (Log of wages)

Model Description
Estimation MethodRanOne
Variance EstimationModel Based
Data SetPSID
Number of Observations4165
Number of Cross Sections595
Time Series Length7

Variance Component Estimates
SourceVarianceStandard
Deviation
Cross Sections0.0689720.262626
Error0.0231020.151994

Hausman Test For Random Effects
CoefficientsDFm ValuePr > m
995074.87<.0001

Parameter Estimates
VariableDFEstimateStandard
Error
t ValuePr > |t|Label
Intercept14.263820.097743.64<.0001Intercept
wks10.0010350.0007731.340.1810Weeks worked
south1-0.016620.0265-0.630.53091 if resides in the South
smsa1-0.013810.0200-0.690.48971 if resides in SMSA
ms1-0.074630.0230-3.240.00121 if married
exp10.0820510.0028528.81<.0001Years full-time experience
exp21-0.000810.000063-12.87<.0001exp squared
occ1-0.050070.0166-3.010.00261 if blue-collar occupation
ind10.0037450.01730.220.82831 if manufacturing
union10.0632260.01713.700.00021 if union contract
fem1-0.339230.0513-6.61<.00011 if female
blk1-0.210270.0580-3.630.00031 if black
ed10.0996530.0057517.34<.0001Years of education


An alternative could be a fixed-effects (FIXONE) model, but that model would not permit estimation of the coefficient for ED, which does not vary within individuals. A compromise is the Hausman-Taylor model, for which you stipulate a set of covariates that are correlated with the individual effects (but uncorrelated with the observation-level errors). You specify the correlated variables in the CORRELATED statement:

proc cpanel data =  mylib.psid;
   id id t;
   model lwage = wks south smsa ms exp exp2 occ
                           ind union fem blk ed / htaylor;
   correlated wks ms exp exp2 union ed;
run;

The results are shown in Figure 3. The table of parameter estimates has an added column, Type, which identifies the regressors that are assumed to be correlated with individual effects (C) and the regressors that do not vary within cross sections (TI). It was stated previously that the Hausman-Taylor model is a compromise between fixed-effects and random-effects models, and you can think of the compromise this way: You want to fit a random-effects model, but the correlated (C) variables make that model invalid. So you fall back to the consistent fixed-effects model, but then the time-invariant (TI) variables are the problem because they would be dropped from that model. The solution is to use the Hausman-Taylor estimator.

The estimation results show that an additional year of schooling is now associated with a 13.8% increase in wages. Also presented is a Hausman test that compares this model to the fixed-effects model. As was the case previously when you fit the random-effects model, you can think of the Hausman test as a referendum on the assumptions you are making. For this estimation, it seems that your choice of variables to treat as correlated is adequate.

Figure 3: Hausman-Taylor Estimation

The CPANEL Procedure
Hausman and Taylor Model for Correlated Individual Effects
Dependent Variable: lwage (Log of wages)

Variance Component Estimates
SourceVarianceStandard
Deviation
Cross Sections0.8869930.941803
Error0.0230440.151803

Hausman Test vs. Fixed Effects
CoefficientsDFm ValuePr > m
935.260.1539

Parameter Estimates
VariableTypeDFEstimateStandard
Error
t ValuePr > |t|Label
InterceptTI12.9127260.283710.27<.0001Intercept
wksC10.0008370.0006001.400.1627Weeks worked
south 10.007440.03200.230.81591 if resides in the South
smsa 1-0.041830.0190-2.210.02741 if resides in SMSA
msC1-0.029850.0190-1.570.11591 if married
expC10.1131330.0024745.79<.0001Years full-time experience
exp2C1-0.000420.000055-7.67<.0001exp squared
occ 1-0.02070.0138-1.500.13311 if blue-collar occupation
ind 10.0136040.01520.890.37201 if manufacturing
unionC10.0327710.01492.200.02801 if union contract
femTI1-0.130920.1267-1.030.30141 if female
blkTI1-0.285750.1557-1.840.06651 if black
edC TI10.1379440.02126.49<.0001Years of education

C: correlated with the individual effects
TI: constant (time-invariant) within cross sections


At its core, the Hausman-Taylor estimator is an instrumental variables regression, where the instruments are derived from regressors that are assumed to be uncorrelated with the individual effects. Technically, it is the cross-sectional means of these variables that need to be uncorrelated, not the variables themselves.

The Amemiya-MaCurdy model is a close relative of the Hausman-Taylor model. The only difference between the two is that the Amemiya-MaCurdy model makes the added assumption that the regressors (and not just their means) are uncorrelated with the individual effects. By making that assumption, the Amemiya-MaCurdy model can take advantage of a more efficient set of instrumental variables.

The following statements fit the Amemiya-MaCurdy model:

proc cpanel data =  mylib.psid;
   id id t;
   model lwage = wks south smsa ms exp exp2 occ
                           ind union fem blk ed / amacurdy;
   correlated wks ms exp exp2 union ed;
run;

The results are shown in Figure 4. Little is changed from the Hausman-Taylor model. The Hausman test compares the Amemiya-MaCurdy model to the Hausman-Taylor model (not the fixed-effects model as previously) and shows that the one additional assumption is acceptable. You even gained a bit of efficiency in the process; compare the standard deviations of the coefficient on the variable ED from both models.

Figure 4: Amemiya-MaCurdy Estimation

The CPANEL Procedure
Amemiya and MaCurdy Model for Correlated Individual Effects
Dependent Variable: lwage (Log of wages)

Variance Component Estimates
SourceVarianceStandard
Deviation
Cross Sections0.8869930.941803
Error0.0230440.151803

Hausman Test vs. Hausman-Taylor
CoefficientsDFm ValuePr > m
131314.670.3287

Parameter Estimates
VariableTypeDFEstimateStandard
Error
t ValuePr > |t|Label
InterceptTI12.9273380.275110.64<.0001Intercept
wksC10.0008380.0005991.400.1622Weeks worked
south 10.0072820.03190.230.81971 if resides in the South
smsa 1-0.041950.0189-2.210.02691 if resides in SMSA
msC1-0.030090.0190-1.590.11271 if married
expC10.112970.0024745.76<.0001Years full-time experience
exp2C1-0.000420.000055-7.72<.0001exp squared
occ 1-0.020850.0138-1.510.12991 if blue-collar occupation
ind 10.0136290.01520.890.37091 if manufacturing
unionC10.0324750.01492.180.02931 if union contract
femTI1-0.132010.1266-1.040.29721 if female
blkTI1-0.28590.1555-1.840.06601 if black
edC TI10.1372050.02066.67<.0001Years of education

C: correlated with the individual effects
TI: constant (time-invariant) within cross sections


Finally, you should realize that the Hausman-Taylor and Amemiya-MaCurdy estimators are not cure-alls for correlated individual effects. Estimation tacitly relies on the uncorrelated regressors being sufficient to predict the correlated regressors. Otherwise, you run into the problem of weak instruments. If you have weak instruments, you will obtain biased estimates that have very large standard errors. However, that does not seem to be the case here.

Last updated: July 09, 2026