Вы находитесь на странице: 1из 6

Name: Luu Nguyen Phu An

Student ID: 31151021903


Class: AE-DH41ISB-01

Home assignment 2
Chapter 4:
C1:
(i) Holding other things fixed,

expendA 1
voteA= 1 100
=
expendA
100
expendA 100
1
by

implies that when

expendA

changes by 1 percent,

voteA

will change

1
100 percent.

(ii) Stating the null hypothesis:


1+ 2=0
H0:
This means that a z% increase in
x pendB

(iii)

, which causes

voteA

expendA

results in a z% decrease in

remain unchanged.

The regression model:


^
voteA =45.07893+ 6.083316l expendA6.615417 l expendB+ 0.1519574 prtystrA

The coefficient of

(0.38215)
(0.3788203)
(0.0620181)
2
n=173, R = 0.7926
l expendA is very significant (t statistic 15.92), thus As

expenditures affect the outcome. The same with


l expendB

is also very significant (t statistic

e xpend B

, the coefficient of

-17.46), hence, Bs

expenditures affect the outcome.


No, we cannot use these results to test the hypothesis in part (ii), because to
^ ^
calculate t statistic for H0, we need to know se( 1+ 2 )
(iv)

Write

1= 1 + 2 , then 1= 1 2

Population model:
voteA = 0 +1 l expendA + 2 ( l expendBl expend A )+ 3 1519574 prtystrA
Stating the hypothesis:
1+ 2=0
H0:
1+ 2 0

H1:

Regression model:
^
voteA =45.078930.532101l expendA6.615417 ( l expendBl expendA )+ 0.1519574 prtystrA
(.5330858)
(.3788203)
(.0620181)
t statistic=-1, P( |t|>1 =0.320> =0.05 , then do not reject H0 at 5% level.
Stata command:
+ reg voteA lexpendA lexpendB prtystraA

+ gen substractionlexpendBnlexpendA= l expendBl expendA


+ reg voteA lexpendA substractionlexpendBnlexpendA prtystraA

C3:
The population model:

lprice= 0+ 1 sqrft + 2 bdrms+u

1=150 1+ 2

(i)

The estimated model:


^
lprice=4.766027+ 0.0003794 sqrft + 0.0003794 bdrms

Thus,
(ii)

(0.0970445)
(0.0000432) (0.0296433)
2
n= 88, R = 0.5883
^
^
^
1=150 1 + 2 = 150 0.0003794+ 0.0003794 =0.085794
=

1150 1

lprice= 0+ 1 sqrft + ( 1150 1 ) bdrms+u


lprice= 0+ 1 (sqrft 150 bdrms)+ 1 bdrms+u
(iii)

The estimated model:


^
lprice=4.766027+ 0.0003794 ( sqrft 150 bdrms ) +0.0858013 bdrms
(0.0970445)
(0.0267675)
n=88, R2= 0.5883

(0.0000432)

From the estimated model, we obtain

^1=0.0858013

and

se (^1)=0.0267675 .

Thus, t-statistic= 3.21. The 95% confidence interval reported by my software


package is .0326 to .1390.
Stata command:
+ reg lprice sqrft bdrms
+ gen sqrf150bdrms= sqrft-150* bdrms
+ reg lprice sqrf150bdrms bdrms
Chapter 6:
C5:
(i)
The estimate model:
^
lprice=1.297+0.1679 llotsize+0.700 lsqrft +0.0369 bdrms
(0.651) (0.0382812)

(0.0928652) (0.0275)

n=88, R2= 0.643


(ii)

With lotsize = 20,000, sqrft = 2,500, and bdrms = 4, we have


^
lprice = -1.297 + 0.1679 x log(20,000) + 0.700 x log(2,500) +
0.0369(4) 5.99

. Using the methods in Section 6.4, find the predicted value of price at the same
values of the explanatory variables.

We create:

0= 0 + 1 v 1+ 2 v 2 + 3 v 3

then,

It is easy to compute the estimator of

v
log ( 1)2 log ( v 2 ) 3 log ( v 3)
0=0 1

v
v
^
log ( 1) 2 log ( v 2) ^
3 log ( v 3 )
log ( 1)+ ^2 log ( v 2 ) + ^
3 log ( v 3)then, ^
0=^0 ^
1
^
^
^
0= 0 + 1
Plug (1) into the equation:

v 1=20000, v2 =2500, v 3=4

(1)

log ( 1 )
+ 3 (bdrmsv 3 )+ u
llotsize+ 2

lprice= 0+ 1
20000
llotsizelog ( )

+0.0369(bdrms4)

^
lprice=5.99+0.168

We use the equation:


^ i=exp ( ^
m
lprice)

^)
^
price=^0 exp ( lprice
, where

from the regression

regression we get

pricei on m
^i

is the slope on

, i=1,2,388. When we do this

^0=1.097

The predicted value of price: 1.097


(iii)

^0

The population model:

e5.99=437.703 US dollars.

price= 0 + 1 lotsize+ 2 sqrft + 3 bdrms+u

(2)

The estimated model of this population we obtain R2= 0.6724


When we run the regression with all variables in levels, the R-squared is
about .672.
m
^i
When we compute the correlation between price and the
from part
(ii), we obtain about 0.859. The square of this, or roughly 0.738, is the
comparable goodness-of-fit measure for the model with log(price) as the
dependent variable. Therefore, for predicting price, the log model is slightly
better.
Stata Command:
+ reg lprice llotsize lsqrft bdrms
+ v1llotsize= llotsize-log(20000)
+ v2lsqrft= lsqrft-log(2500)
+ v3bdrms= bdrms-4
+ reg lprice v1llotsize v2lsqrft v3bdrms

+ reg price lotsize sqrft bdrms


+ gen fittedlprice=-1.297042+ .1679667* llotsize+ .7002324* lsqrft+ .0369584*
bdrms
+ gen expfittedlprice=exp( fittedlprice)
+ reg price expfittedlprice
+ correlate price expfittedlprice

C10:
(i)
The estimate model:
^
lbwght=7.958+0.0189 npvis0.00043npvissq
(0.0273)

(0.00368)

n=1764, R2= 0.0213,

2
R =

(0.00012)

0.0201

Yes, the quadratic term is significant because its t-statistic is 3.57 in absolute
value.
(ii)

^
y=lbwght=7.958+0.0189 npvis0.00043 npvissq
We take the first derivative of y with respect to npvis: y=
0.01890.00043 npvis
0.0189
Then let y=0, the turning point will be npvis*= 2 0.00043 =21,97 22

(iii)

(iv)

In the sample, 89 women had 22 or more prenatal visits.


While prenatal visits are good things for helping to prevent low birth weight,
however a woman, who has too many prenatal visits, may be facing to
pregnancy with difficulties. Hence, it does make sense that the birth weight
is predicted to decline after 22 prenatal visits.
The estimate model:
^
lbwght=7.5837+0.018 npvis0.00041npvissq+ 0.025392mage0.00041 magesq
(0.137) (0.0037)
(0.00015)

(0 .00012)(0.00925)
2

n 1764 ; R =0.0234

Holding npvis fixed, the birth weight of the child is maximized at the turning
point, which equals to

(v)

(vi)

mage =

0.025392
=30.96 31 years old .
0.000412

The number of women, who are older than the optimal age is 605. It means
that 34.2% of the given sample.
No, we cannot say mothers age and number of prenatal visits explain a lot
of the variation in log(bwght). Because it only can explain 2% of the variation
in log(bwght).
2
If we regress bwght on npvis, npvisq, mage, and magesq, then R =.0192 .
Instead, we compute an R-squared for the bwght model that can be
compared with .0192. From Section 6.4, we compute the squared correlation
^
^
between bwght and exp ( lbwght) , where lbwght denotes the fitted values
from the log(bwght) model. The correlation is 0.1362, so its square is about
0.0185.
Therefore, for explaining bwght, the model with bwght actually fits better.
STATA COMMAND:
+ reg lbwght npvis npvissq
+ count if npvis>21
+ reg lbwght npvis npvissq mage magesq
+ count if mage>31
+ gen fittedlbwght= 7.5837+ .0180374*npvis
-.0004079*npvissq+.025392*mage -.0004119*magesq
+ gen expfittedlbwght=exp(fittedlbwght)
+ reg bwght expfittedlbwght
+ correlate bwght expfittedlbwght

Вам также может понравиться