Escolar Documentos
Profissional Documentos
Cultura Documentos
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)
(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 ) ]
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
Computer Problems
C7.8
Partridge 3
(i)
(ii)
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|
0.000
0.000
.1616864
.6720221
.239505
.7435623
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
.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
.0114349
.0042599
-.0078812
-.0791175
-.0012733
.0308875
.0774251
.0054817
.0343344
.0982757
.1675632
-.1851205
.0350624
.0043414
-.0030975
.0125796
1.350894
Partridge 5
. lincom white +white_obrat*32
( 1)
white + 32*white_obrat = 0
approve
Coef.
(1)
.1128382
Std. Err.
.0201878
5.59
P>|t|
0.000
.0732463
.1524301
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
-.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
-.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)
Obs
Mean
phat
660
.6242424
Std. Dev.
.1606227
Min
Max
.2403174
1.07086
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
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
-.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
-.6310821
-.0255302
.0008529
10.86538
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
-.0672398
.3586191
-.0021239
-2.313152
educ
age agesq frsthalf
(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
-.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
-.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)
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
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|
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
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
.7102883
.0215209
-.015836
-.5469881
-.0024234
.1784521
.4504779
.0269753
.2024967
.5677343
.7733818
-.5311578
.308468
.1456823
-.041338
2.676141
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
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
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)