You are on page 1of 12

Partridge 1

Stephanie Partridge
999046667
ECN140
Written Problems
15.8
(i) other things you would control for are things that might affect their math scores
other than whether they attend coed or all girls schools. Such things are IQ scores,
parents education, attendance of math class, and whether they go to tutors outside
of school.
(ii)

score= 0 + 1 girlhs+ 2 IQ+ 3 parenteduc + 4 attendence+ 5 tutor+ u

(iii) Parental support and motivation could be correlated with girlhs since parents
who choose to send their daughters to girls only high schools might be more
involved in their daughters education compared to parents who might send their
children to the closest coed school since coed schools are more prevalent in the
USA. Motivation might be higher in students of girls only high schools since there is
less distraction of dating with male students.
(iv) In order for the number of girls only high schools in a 20 mile radius to be
correlated with girlhs, the new variable must have no correlation with the error term
but there must exist a correlation between the new variable and girlhs.
17.2

^
P ( grad=1|hsGPA , SAT , study )= (1.17+.24 hsGPA +.00058 SAT +.073 study )
( z )=exp ( z ) /[1+ exp ( z ) ]
Hold hsGPA=3, SAT=1200
Compute difference for study=10 and study=5

^
P ( grad=1|hsGPA , SAT , study )= (1.17+.24(3)+.00058(1200)+.073(10))

^
P ( grad=1|hsGPA , SAT , study )= (.976)

^
P ( grad=1|hsGPA , SAT , study )=exp(.976)/[1+exp ( .976 ) ]

^
P ( grad=1|hsGPA , SAT , study )= (1.17+.24 hs (3)+ .00058(1200)+.073 (5))

^
P ( grad=1|hsGPA , SAT , study )= (.611)

Partridge 2

^
P ( grad=1|hsGPA , SAT , study )=exp(.611)/[1+exp ( .611 ) ]

Therefore, difference in the estimated graduation probability for 10 and 5 hours


studying in a study hall per week is

exp ( .976 )
exp(.611)/ [ 1+ exp ( .611 ) ]
[ 1+exp ( .976 ) ]

13.2
Equation 13.9:

^
log ( price )=11.29+.457 y 81.340 nearinc.063 y 81nearinc
(.31)

(.045)

(.055)

(.083)

n=321, R2=.409
in 1978, y81*nearinc=.394
in 1981, y81*nearinc=-.403
In 1978, there were no rumors of building a new incinerator, so there was no negative
effect on home prices due to the incinerator plans, however after 1978 the rumors
began to grow which made nearinc and y81*nearinc have a negative coefficient since
being near the incinerator would make a home less desirable.
13.6
(i)

arrest= 0 + 1 law +u

1 measures the effect of the law


(ii) you might want to control for other factors so that you are not mis-measuring the
effect of the law on probability of being arrested for drunk driving when other factors
are involved. Such factors are prevalence of religion and drug/alcohol education of
drivers.
(iii) There are different independent factors that might contribute such as average age
in the county. You would use a linear model with the fraction of licensed drivers arrested
for drunk driving as the dependent variable, a constant, an error term, and the
independent dummy variable for presence of the open container law as well as
including the other important factors such as average age in the county and religious
affiliation.

Computer Problems
C7.8

approve= 0+ 1 +other factors

Partridge 3
(i)
(ii)

Sign of 1 is positive if there is discrimination


. reg approve white
Source

SS

df

MS

Model
Residual

10.4743407
203.59303

1
1,987

10.4743407
.102462521

Total

214.067371

1,988

.107679764

approve

Coef.

white
_cons

.2005957
.7077922

Std. Err.
.01984
.0182393

t
10.11
38.81

Number of obs
F(1, 1987)
Prob > F
R-squared
Adj R-squared
Root MSE

=
=
=
=
=
=

1,989
102.23
0.0000
0.0489
0.0485
.3201

P>|t|

[95% Conf. Interval]

0.000
0.000

.1616864
.6720221

.239505
.7435623

The coefficient on white is significant and large


(iii)
. reg approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mor
> tlat1 mortlat2 vr
Source

SS

df

MS

Model
Residual

35.4004787
178.393534

15
1,955

2.36003192
.09124989

Total

213.794013

1,970

.10852488

approve

Coef.

white
hrat
obrat
loanprc
unem
male
married
dep
sch
cosign
chist
pubrec
mortlat1
mortlat2
vr
_cons

.1288196
.001833
-.0054318
-.1473001
-.0072989
-.0041441
.0458241
-.0068274
.0017525
.0097722
.1330267
-.2419268
-.0572511
-.1137234
-.0314408
.9367312

Std. Err.
.0197317
.0012632
.0011018
.0375159
.003198
.0188644
.0163077
.0067013
.0166498
.0411394
.0192627
.0282274
.050012
.0669838
.0140313
.0527354

t
6.53
1.45
-4.93
-3.93
-2.28
-0.22
2.81
-1.02
0.11
0.24
6.91
-8.57
-1.14
-1.70
-2.24
17.76

Number of obs
F(15, 1955)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.147
0.000
0.000
0.023
0.826
0.005
0.308
0.916
0.812
0.000
0.000
0.252
0.090
0.025
0.000

=
=
=
=
=
=

1,971
25.86
0.0000
0.1656
0.1592
.30208

[95% Conf. Interval]


.0901223
-.0006444
-.0075926
-.2208755
-.0135708
-.0411405
.0138418
-.0199699
-.0309006
-.0709094
.0952492
-.2972858
-.1553336
-.2450905
-.0589586
.8333077

Coefficient of white decreases but stays positive


The coefficient on white is significant and not as large

.1675169
.0043104
-.003271
-.0737246
-.0010271
.0328523
.0778064
.0063151
.0344057
.0904538
.1708043
-.1865677
.0408314
.0176438
-.0039229
1.040155

Partridge 4

(iv)
. gen white_obrat = white*obrat
. reg approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mor
> tlat1 mortlat2 vr white_obrat
Source

SS

df

MS

Model
Residual

36.5318071
177.262206

16
1,954

2.28323794
.090717608

Total

213.794013

1,970

.10852488

approve

Coef.

white
hrat
obrat
loanprc
unem
male
married
dep
sch
cosign
chist
pubrec
mortlat1
mortlat2
vr
white_obrat
_cons

-.1459751
.0017897
-.0122262
-.1525356
-.0075281
-.0060154
.0455358
-.00763
.0017766
.0177091
.1298548
-.240325
-.0627819
-.1268446
-.0305396
.0080879
1.180648

Std. Err.
.080263
.0012596
.0022155
.0374357
.0031893
.0188167
.0162603
.0066856
.0166011
.0410807
.0192274
.0281486
.0498906
.0668914
.0139926
.0022903
.0868076

t
-1.82
1.42
-5.52
-4.07
-2.36
-0.32
2.80
-1.14
0.11
0.43
6.75
-8.54
-1.26
-1.90
-2.18
3.53
13.60

Number of obs
F(16, 1954)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.069
0.156
0.000
0.000
0.018
0.749
0.005
0.254
0.915
0.666
0.000
0.000
0.208
0.058
0.029
0.000
0.000

=
=
=
=
=
=

1,971
25.17
0.0000
0.1709
0.1641
.30119

[95% Conf. Interval]


-.3033851
-.0006806
-.0165713
-.2259537
-.0137829
-.0429184
.0136465
-.0207417
-.0307812
-.0628576
.0921464
-.2955296
-.1606262
-.2580306
-.0579816
.0035963
1.010403

.0114349
.0042599
-.0078812
-.0791175
-.0012733
.0308875
.0774251
.0054817
.0343344
.0982757
.1675632
-.1851205
.0350624
.0043414
-.0030975
.0125796
1.350894

There is still significant discrimination against minorities. Whatever your


prior obligations are, if you are white there is less effect on loan approval.
(v)

Partridge 5
. lincom white +white_obrat*32
( 1)

white + 32*white_obrat = 0

approve

Coef.

(1)

.1128382

Std. Err.

.0201878

5.59

P>|t|

[95% Conf. Interval]

0.000

.0732463

.1524301

Coefficient of white is positive and significant as it is within the 95%


Confidence Interval

C7.13
(i)
. gen ecobuy =(ecolbs>0)
. tab ecobuy
ecobuy

Freq.

Percent

Cum.

0
1

248
412

37.58
62.42

37.58
100.00

Total

660

100.00

412 people buy the organic apples which is 62.42% of the samples
(ii)
. reg ecobuy ecoprc regprc faminc hhsize educ age
Source

SS

df

MS

Model
Residual

17.0019785
137.810143

6
653

2.83366308
.211041566

Total

154.812121

659

.234919759

ecobuy

Coef.

ecoprc
regprc
faminc
hhsize
educ
age
_cons

-.8026219
.7192675
.0005518
.0238227
.0247849
-.0005008
.4236865

Std. Err.
.1094037
.131639
.0005295
.0125262
.0083743
.0012499
.1649674

t
-7.34
5.46
1.04
1.90
2.96
-0.40
2.57

Number of obs
F(6, 653)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.000
0.298
0.058
0.003
0.689
0.010

=
=
=
=
=
=

660
13.43
0.0000
0.1098
0.1016
.45939

[95% Conf. Interval]


-1.017447
.4607808
-.000488
-.0007739
.008341
-.0029551
.099756

-.5877963
.9777543
.0015916
.0484193
.0412287
.0019536
.747617

Partridge 6

(iii)

A greater price for the organic apples decreases chances of buying the
organic apples. A greater price of the regular apples increases the
chances of buying the organic apples.
S
F test
. test faminc=hhsize=educ=age=0
(
(
(
(

1)
2)
3)
4)

faminc
faminc
faminc
faminc
F(

hhsize = 0
educ = 0
age = 0
0

4,
653) =
Prob > F =

4.43
0.0015

The values are significant, looking at t test, the hhsize and educ are most
significant, age and faminc have less effect on buying organic apples or
not. This makes sense since education affects knowledge of organic goods
and household size affects the total amount the household will have to
spend on groceries.
(iv)
. reg ecobuy ecoprc regprc lfaminc hhsize educ age
Source

SS

df

MS

Model
Residual

17.278689
137.533432

6
653

2.8797815
.210617813

Total

154.812121

659

.234919759

ecobuy

Coef.

ecoprc
regprc
lfaminc
hhsize
educ
age
_cons

-.8006664
.721377
.0445162
.0227002
.023093
-.0003865
.3037519

Std. Err.
.1092981
.1315196
.0287239
.012543
.0084508
.0012517
.1789605

Number of obs
F(6, 653)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|

-7.33
5.48
1.55
1.81
2.73
-0.31
1.70

0.000
0.000
0.122
0.071
0.006
0.758
0.090

=
=
=
=
=
=

660
13.67
0.0000
0.1116
0.1034
.45893

[95% Conf. Interval]


-1.015285
.4631247
-.0118861
-.0019294
.006499
-.0028444
-.0476555

-.5860482
.9796294
.1009185
.0473297
.039687
.0020713
.6551593

This model fits the data better as R 2 is greater for this model. For an
increase of family income of 1%, we expect ecobuy to increase by .
0445162/100 units
(v)

Predicting probabilities to see if there is a problem


. sum phat
Variable

Obs

Mean

phat

660

.6242424

Std. Dev.
.1606227

Min

Max

.2403174

1.07086

Minimum is far above 0, so there are no negative probabilities. Max is a


little above 1

Partridge 7
. count if phat>1
2

Then there are 2 variables with probabilities above 1, from sample of 660,
this is insignificant.

(vi)
. gen ecobuy_hat=(phat>0.5)
. tab ecobuy ecobuy_hat, cell

Key
frequency
cell percentage

ecobuy

ecobuy_hat
0

Total

99
15.00

149
22.58

248
37.58

75
11.36

337
51.06

412
62.42

Total

174
26.36

486
73.64

660
100.00

We can see that we have ecobuy and ecobuy_hat are 0 for 99


observations and both are 1 for 75. Observations in the diagonal were
predicted correctly. Observations in the opposite (top right to lower left)
diagonal are predicted incorrectly. Predicted 15+51%=66% observations
predicted correctly.

C15.2
(i)

Partridge 8
. reg children educ age agesq
Source

SS

df

MS

Model
Residual

12243.0295
9284.14679

3
4,357

4081.00985
2.13085765

Total

21527.1763

4,360

4.93742577

children

Coef.

educ
age
agesq
_cons

-.0905755
.3324486
-.0026308
-4.138307

Std. Err.
.0059207
.0165495
.0002726
.2405942

t
-15.30
20.09
-9.65
-17.20

Number of obs
F(3, 4357)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.000
0.000
0.000

=
=
=
=
=
=

4,361
1915.20
0.0000
0.5687
0.5684
1.4597

[95% Conf. Interval]


-.102183
.3000032
-.0031652
-4.609994

-.0789679
.364894
-.0020964
-3.66662

If a woman has 1 extra year of education she will have .09 less kids

(ii)
. reg educ frsthalf age agesq
Source

SS

df

MS

Model
Residual

7238.42472
60001.141

3
4,357

2412.80824
13.7712052

Total

67239.5657

4,360

15.4219187

educ

Coef.

frsthalf
age
agesq
_cons

-.8522854
-.1079504
-.0005056
9.692864

Std. Err.
.1128296
.0420402
.0006929
.5980686

t
-7.55
-2.57
-0.73
16.21

Number of obs
F(3, 4357)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.010
0.466
0.000

=
=
=
=
=
=

4,361
175.21
0.0000
0.1077
0.1070
3.711

[95% Conf. Interval]


-1.073489
-.1903706
-.0018641
8.520346

-.6310821
-.0255302
.0008529
10.86538

Frsthalf is very significant and good at predicted number of kids

Partridge 9
. ivreg children (educ = frsthalf) age agesq
Instrumental variables (2SLS) regression
Source

(iii)

SS

df

MS

Model
Residual

11844.96
9682.2163

3
4,357

3948.32001
2.22222086

Total

21527.1763

4,360

4.93742577

children

Coef.

educ
age
agesq
_cons

-.1714989
.3236052
-.0026723
-3.387805

Instrumented:
Instruments:

Std. Err.
.0531796
.0178596
.0002797
.5481502

t
-3.22
18.12
-9.55
-6.18

Number of obs
F(3, 4357)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.001
0.000
0.000
0.000

=
=
=
=
=
=

4,361
1765.12
0.0000
0.5502
0.5499
1.4907

[95% Conf. Interval]


-.2757581
.2885913
-.0032206
-4.462459

-.0672398
.3586191
-.0021239
-2.313152

educ
age agesq frsthalf

Educ has negative effect on number of children


And the coefficient is larger than in the endogenous regression

(iv)
. reg children educ age agesq electric tv bicycle
Source

SS

df

MS

Model
Residual

12387.1794
9116.10133

6
4,349

2064.5299
2.09613735

Total

21503.2808

4,355

4.93760752

children

Coef.

educ
age
agesq
electric
tv
bicycle
_cons

-.0767093
.3402038
-.0027081
-.3027293
-.2531443
.317895
-4.389784

Std. Err.
.0063526
.0164417
.0002706
.0761869
.0914374
.0493661
.2403173

t
-12.08
20.69
-10.01
-3.97
-2.77
6.44
-18.27

Number of obs
F(6, 4349)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.000
0.000
0.000
0.000
0.006
0.000
0.000

=
=
=
=
=
=

4,356
984.92
0.0000
0.5761
0.5755
1.4478

[95% Conf. Interval]


-.0891636
.3079697
-.0032385
-.4520944
-.4324082
.2211123
-4.860928

-.064255
.3724379
-.0021777
-.1533641
-.0738803
.4146778
-3.918639

Partridge 10
. ivreg children (educ=frsthalf) age agesq electric tv bicycle
Instrumental variables (2SLS) regression
Source

SS

df

MS

Model
Residual

11991.5668
9511.71394

6
4,349

1998.59447
2.18710369

Total

21503.2808

4,355

4.93760752

children

Coef.

educ
age
agesq
electric
tv
bicycle
_cons

-.1639814
.3281451
-.0027222
-.1065314
-.002555
.3320724
-3.591332

Instrumented:
Instruments:

Std. Err.
.0655269
.0190587
.0002766
.165965
.2092301
.0515264
.6450889

t
-2.50
17.22
-9.84
-0.64
-0.01
6.44
-5.57

Number of obs
F(6, 4349)
Prob > F
R-squared
Adj R-squared
Root MSE

P>|t|
0.012
0.000
0.000
0.521
0.990
0.000
0.000

=
=
=
=
=
=

4,356
921.71
0.0000
0.5577
0.5571
1.4789

[95% Conf. Interval]


-.2924476
.2907803
-.0032644
-.4319073
-.4127527
.2310543
-4.856035

-.0355153
.3655098
-.00218
.2188445
.4076427
.4330904
-2.326629

educ
age agesq electric tv bicycle frsthalf

Again the estimated coefficient of educ is still negative but larger in the
latter regression.
TV ownership has a negative effect on fertility because it is related to
income and how time is used.

C17.2
(i)

Running a probit regression


. probit approve white
Iteration
Iteration
Iteration
Iteration

0:
1:
2:
3:

log
log
log
log

likelihood
likelihood
likelihood
likelihood

=
=
=
=

-740.34659
-701.33221
-700.87747
-700.87744

Probit regression

Number of obs
LR chi2(1)
Prob > chi2
Pseudo R2

Log likelihood = -700.87744

approve

Coef.

white
_cons

.7839465
.5469463

Std. Err.
.0867118
.075435

z
9.04
7.25

=
=
=
=

1,989
78.94
0.0000
0.0533

P>|z|

[95% Conf. Interval]

0.000
0.000

.6139946
.3990964

.9538985
.6947962

Probability for loan approval is greater for whites than non-whites. This
matches with the linear model.

Partridge 11
(ii)
. probit approve white hrat obrat loanprc unem male married dep sch cosign chist
> pubrec mortlat1 mortlat2 vr
Iteration
Iteration
Iteration
Iteration
Iteration

0:
1:
2:
3:
4:

log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=

-737.97933
-603.5925
-600.27774
-600.27099
-600.27099

Probit regression

Number of obs
LR chi2(15)
Prob > chi2
Pseudo R2

Log likelihood = -600.27099

approve

Coef.

white
hrat
obrat
loanprc
unem
male
married
dep
sch
cosign
chist
pubrec
mortlat1
mortlat2
vr
_cons

.5202525
.0078763
-.0276924
-1.011969
-.0366849
-.0370014
.2657469
-.0495756
.0146496
.0860713
.5852812
-.7787405
-.1876237
-.4943562
-.2010621
2.062327

Std. Err.
.0969588
.0069616
.0060493
.2372396
.0174807
.1099273
.0942523
.0390573
.0958421
.2457509
.0959715
.12632
.2531127
.3265563
.0814934
.3131763

z
5.37
1.13
-4.58
-4.27
-2.10
-0.34
2.82
-1.27
0.15
0.35
6.10
-6.16
-0.74
-1.51
-2.47
6.59

P>|z|
0.000
0.258
0.000
0.000
0.036
0.736
0.005
0.204
0.879
0.726
0.000
0.000
0.459
0.130
0.014
0.000

=
=
=
=

1,971
275.42
0.0000
0.1866

[95% Conf. Interval]


.3302168
-.0057682
-.0395488
-1.47695
-.0709464
-.2524549
.0810159
-.1261266
-.1731974
-.3955917
.3971805
-1.026323
-.6837153
-1.134395
-.3607862
1.448512

.7102883
.0215209
-.015836
-.5469881
-.0024234
.1784521
.4504779
.0269753
.2024967
.5677343
.7733818
-.5311578
.308468
.1456823
-.041338
2.676141

There is statistically significant evidence of discrimination against


nonwhites looking at the estimated coefficient of white and the given 95%
confidence interval
(iii)

Partridge 12
. logit approve white hrat obrat loanprc unem male married dep sch cosign chist
> pubrec mortlat1 mortlat2 vr
Iteration
Iteration
Iteration
Iteration
Iteration
Iteration

0:
1:
2:
3:
4:
5:

log
log
log
log
log
log

likelihood
likelihood
likelihood
likelihood
likelihood
likelihood

=
=
=
=
=
=

-737.97933
-634.97536
-601.41194
-600.49724
-600.49616
-600.49616

Logistic regression

Number of obs
LR chi2(15)
Prob > chi2
Pseudo R2

Log likelihood = -600.49616

approve

Coef.

white
hrat
obrat
loanprc
unem
male
married
dep
sch
cosign
chist
pubrec
mortlat1
mortlat2
vr
_cons

.9377643
.0132631
-.0530338
-1.904951
-.0665789
-.0663852
.5032817
-.0907336
.0412287
.132059
1.066577
-1.340665
-.3098821
-.8946755
-.3498279
3.80171

Std. Err.
.1729043
.0128802
.0112803
.4604433
.0328086
.2064292
.1779983
.0733342
.1784038
.4460944
.1712119
.2173659
.46352
.5685814
.1537251
.5947074

z
5.42
1.03
-4.70
-4.14
-2.03
-0.32
2.83
-1.24
0.23
0.30
6.23
-6.17
-0.67
-1.57
-2.28
6.39

P>|z|
0.000
0.303
0.000
0.000
0.042
0.748
0.005
0.216
0.817
0.767
0.000
0.000
0.504
0.116
0.023
0.000

=
=
=
=

1,971
274.97
0.0000
0.1863

[95% Conf. Interval]


.598878
-.0119816
-.0751427
-2.807404
-.1308826
-.4709789
.1544114
-.234466
-.3084363
-.7422699
.7310075
-1.766694
-1.218365
-2.009075
-.6511237
2.636105

1.27665
.0385078
-.0309249
-1.002499
-.0022751
.3382086
.852152
.0529989
.3908938
1.006388
1.402146
-.9146358
.5986004
.2197237
-.0485322
4.967315

The coefficient on white in the logit estimate is far greater than in the
probit estimate
(iv)

According to equation 17.17, the logit coefficient is about equal to the


probit coefficient when multiplied by 0.625, so the estimated
discrimination effect is the same size in the two models.

You might also like