Example L6 Count
response model
In this example we use data (drvisits.dat) from the German Socio-Economic Panel (SEOP) on the self reported number of visits by women to the doctor, just before a major health care reform in 1997 and just after the reform. The health reform raised prescription charges by 200% and imposed limits on fees charged by doctors. This data was analysed by Winkelmann (2004), Rabe-Hesketh and Skrondal (2005, Ch 6) who note that it is interesting to establish if the health reforms tended to reduce visits by the women to the doctor. Following Rabe-Hesketh and Skrondal (2005, Ch 5) we consider the subset of women who were working full time in the 1996 and 1998 panels of SEOP.
Rabe-Hesketh and Skrondal (2005, Ch 5) show that fewer than 50% of the women provide data for both the 1996 and 1998 waves. For the purposes of this analysis and like Rabe-Hesketh and Skrondal (2005, Ch 5) we treat the missing data as ignorable and use all the observed responses.
References
Rabe-Hesketh, S., and Skrondal, A., (2005), Multilevel and Longitudinal Modelling using Stata, Stata Press, Stata Corp, College Station, Texas.
Winkelmann, R., (2004), Healthcare reform and thye number of doctor visits: an econometric analysis, Journal of Applied Econometrics, 19, 455-472.
Data description
Number of observations (rows): 2227
Number of variables (columns): 10
The subset of variables we use are:
id=person identifier;
numvisits=self reported number of visits to the doctor during the previous 3 months;
age=age in years (20 to 60);
educ=education in years;
married=1 if the woman was married, 0 otherwise;
badh=1 if the self reported state of health was very poor or poor, 0 otherwise;
loginc=logarithm of household income in 1995 DM,
reform=1 for the 1998 panel data, 0 otherwise;
The first few lines of drvisits.dat look like
Sabre commands
out drvisits.log
trace drvisits.trace
data id numvisit age educ married badh loginc reform
summer obs
read drvisits.dat
case obs
yvar numvisit
family p
constant cons
lfit reform age educ married badh loginc summer cons
dis m
dis e
fit reform age educ married badh loginc summer cons
dis m
dis e
case id
lfit reform age educ married badh loginc summer cons
dis m
dis e
fit reform age educ married badh loginc summer cons
dis m
dis e
stop
Sabre log file
<S> trace drvisits.trace
<S> data id numvisit age educ married badh loginc
reform summer obs
<S> read drvisits.dat
2227
observations in dataset
<S> case obs
<S> yvar numvisit
<S> family p
<S> constant cons
<S> lfit reform age educ married badh loginc summer
cons
Iteration Log. lik. Difference
__________________________________________
1 -7502.8826
2 -6041.6484 1461.
3 -5943.5095 98.14
4 -5942.6925 0.8170
5 -5942.6924 0.8498E-04
<S> dis m
X-vars Y-var
______________________________
cons numvisit
reform
age
educ
married
badh
loginc
summer
Univariate
model
Standard
Poisson
Number of
observations = 2227
X-var df =
8
Log likelihood
= -5942.6924 on
2219 residual degrees of freedom
<S> dis e
Parameter Estimate Std. Err.
___________________________________________________
cons -0.41286 0.26913
reform -0.14047 0.26580E-01
age 0.43611E-02 0.13031E-02
educ -0.10653E-01 0.60102E-02
married 0.41662E-01 0.27869E-01
badh 1.1330 0.30307E-01
loginc 0.14890 0.36072E-01
summer 0.10216E-01 0.40409E-01
<S> fit reform age educ married badh loginc summer
cons
Initial
Homogeneous Fit:
Iteration Log. lik. Difference
__________________________________________
1 -7502.8826
2 -6041.6484 1461.
3 -5943.5095 98.14
4 -5942.6925 0.8170
5 -5942.6924 0.8498E-04
Iteration Log. lik. Step End-points Orthogonality
length 0 1
criterion
________________________________________________________________________
1 -4859.3150 1.0000 fixed
fixed 830.40
2 -4642.0020 1.0000 fixed
fixed 2502.3
3 -4578.7722 1.0000 fixed
fixed 607.18
4 -4560.8207 1.0000 fixed
fixed 289.02
5 -4556.2858 1.0000 fixed
fixed 225.79
6 -4555.0430 1.0000 fixed
fixed 315.35
7 -4552.5998 1.0000 fixed
fixed 13.605
8 -4552.4882 1.0000 fixed
fixed 155.27
9 -4552.4881 1.0000 fixed
fixed 181.54
10 -4552.4881 1.0000 fixed
fixed
<S> dis m
X-vars Y-var Case-var
________________________________________________
cons numvisit obs
reform
age
educ
married
badh
loginc
summer
Univariate
model
Standard
Poisson
Gaussian random
effects
Number of observations = 2227
Number of
cases = 2227
X-var df =
8
Scale df =
1
Log likelihood
= -4552.4881 on
2218 residual degrees of freedom
<S> dis e
Parameter Estimate Std. Err.
___________________________________________________
cons -1.2784 0.50028
reform -0.56688E-01 0.47767E-01
age 0.51025E-02 0.25158E-02
educ 0.92880E-02 0.11103E-01
married 0.11339E-01 0.52326E-01
badh 1.1430 0.61469E-01
loginc 0.16892 0.66601E-01
summer -0.51553E-01 0.75535E-01
scale 0.90172 0.19394E-01
<S> case id
<S> lfit reform age educ married badh loginc summer
cons
Iteration Log. lik. Difference
__________________________________________
1 -7502.8826
2 -6041.6484 1461.
3 -5943.5095 98.14
4 -5942.6925 0.8170
5 -5942.6924 0.8498E-04
<S> dis m
X-vars Y-var
______________________________
cons numvisit
reform
age
educ
married
badh
loginc
summer
Univariate
model
Standard
Poisson
Number of
observations = 2227
X-var df =
8
Log likelihood
= -5942.6924 on
2219 residual degrees of freedom
<S> dis e
Parameter Estimate Std. Err.
___________________________________________________
cons -0.41286 0.26913
reform -0.14047 0.26580E-01
age 0.43611E-02 0.13031E-02
educ -0.10653E-01 0.60102E-02
married 0.41662E-01 0.27869E-01
badh 1.1330 0.30307E-01
loginc 0.14890 0.36072E-01
summer 0.10216E-01 0.40409E-01
<S> fit reform age educ married badh loginc summer
cons
Initial
Homogeneous Fit:
Iteration Log. lik. Difference
__________________________________________
1 -7502.8826
2 -6041.6484 1461.
3 -5943.5095 98.14
4 -5942.6925 0.8170
5 -5942.6924 0.8498E-04
Iteration Log. lik. Step End-points Orthogonality
length 0 1
criterion
________________________________________________________________________
1 -4886.1681 1.0000
fixed fixed 511.63
2 -4718.6770 1.0000 fixed
fixed 3227.1
3 -4665.3282 1.0000 fixed
fixed 2056.0
4 -4655.1747 1.0000 fixed
fixed 706.59
5 -4652.5395 1.0000 fixed
fixed 643.44
6 -4651.1922 1.0000 fixed
fixed 335.76
7 -4650.3290 1.0000 fixed
fixed 213.16
8 -4649.6786 1.0000
fixed fixed 144.40
9 -4649.0833 1.0000 fixed
fixed 146.90
10 -4648.5772 1.0000 fixed
fixed 51.409
11 -4647.9713 1.0000 fixed
fixed 33.725
12 -4647.6488 1.0000 fixed
fixed 11.365
13 -4647.4903 0.1250 fixed
fixed 15.728
14 -4647.3924 1.0000 fixed
fixed 26.114
15 -4647.3923 1.0000
fixed fixed 31.637
16 -4647.3923 1.0000 fixed
fixed
<S> dis m
X-vars Y-var Case-var
________________________________________________
cons numvisit id
reform
age
educ
married
badh
loginc
summer
Univariate
model
Standard
Poisson
Gaussian random
effects
Number of
observations = 2227
Number of
cases = 1518
X-var df =
8
Scale df =
1
Log likelihood
= -4647.3923 on
2218 residual degrees of freedom
<S> dis e
Parameter Estimate Std. Err.
___________________________________________________
cons -0.88590 0.47693
reform -0.40069E-01 0.31762E-01
age 0.11508E-01 0.23579E-02
educ 0.10743E-01 0.13271E-01
married -0.10293E-01 0.50940E-01
badh 0.95315 0.53949E-01
loginc 0.99095E-01 0.64696E-01
summer -0.16654 0.57296E-01
scale 0.89249 0.21100E-01
<S> stop