0% found this document useful (0 votes)
8 views7 pages

Regression Analysis of Birth Weight Factors

The document presents statistical analyses using regression models on two datasets: one examining the impact of family income and cigarette consumption on birth weight, and the other analyzing the effects of education, experience, and tenure on log wages. Key findings include significant negative coefficients for cigarette consumption on birth weight and positive coefficients for family income, while education and experience positively influence log wages. The results are supported by various statistical measures, including R-squared values and significance tests.

Uploaded by

laibaadeelnasir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views7 pages

Regression Analysis of Birth Weight Factors

The document presents statistical analyses using regression models on two datasets: one examining the impact of family income and cigarette consumption on birth weight, and the other analyzing the effects of education, experience, and tenure on log wages. Key findings include significant negative coefficients for cigarette consumption on birth weight and positive coefficients for family income, while education and experience positively influence log wages. The results are supported by various statistical measures, including R-squared values and significance tests.

Uploaded by

laibaadeelnasir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Question : 4.

. use "H:\sem 8\economertics\[Link]", clear

. summarize

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
faminc | 1388 29.02666 18.73928 .5 65
bwght | 1388 118.6996 20.35396 23 271
cigs | 1388 2.087176 5.972688 0 50

. regress bwght cigs faminc

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 2, 1385) = 21.27
Model | 17126.2088 2 8563.10442 Prob > F = 0.0000
Residual | 557485.511 1385 402.516614 R-squared = 0.0298
-------------+------------------------------ Adj R-squared = 0.0284
Total | 574611.72 1387 414.283864 Root MSE = 20.063

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cigs | -.4634075 .0915768 -5.06 0.000 -.6430518 -.2837633
faminc | .0927647 .0291879 3.18 0.002 .0355075 .1500219
_cons | 116.9741 1.048984 111.51 0.000 114.9164 119.0319
------------------------------------------------------------------------------

. regress bwght faminc

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 1, 1386) = 16.65
Model | 6819.0527 1 6819.0527 Prob > F = 0.0000
Residual | 567792.667 1386 409.662819 R-squared = 0.0119
-------------+------------------------------ Adj R-squared = 0.0112
Total | 574611.72 1387 414.283864 Root MSE = 20.24

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
faminc | .1183234 .0290016 4.08 0.000 .0614317 .1752152
_cons | 115.265 1.001901 115.05 0.000 113.2996 117.2304
------------------------------------------------------------------------------

. regress bwght cigs

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 1, 1386) = 32.24
Model | 13060.4194 1 13060.4194 Prob > F = 0.0000
Residual | 561551.3 1386 405.159668 R-squared = 0.0227
-------------+------------------------------ Adj R-squared = 0.0220
Total | 574611.72 1387 414.283864 Root MSE = 20.129

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cigs | -.5137721 .0904909 -5.68 0.000 -.6912861 -.3362581
_cons | 119.7719 .5723407 209.27 0.000 118.6492 120.8946
------------------------------------------------------------------------------

. regress bwght cigs faminc

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 2, 1385) = 21.27
Model | 17126.2088 2 8563.10442 Prob > F = 0.0000
Residual | 557485.511 1385 402.516614 R-squared = 0.0298
-------------+------------------------------ Adj R-squared = 0.0284
Total | 574611.72 1387 414.283864 Root MSE = 20.063

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cigs | -.4634075 .0915768 -5.06 0.000 -.6430518 -.2837633
faminc | .0927647 .0291879 3.18 0.002 .0355075 .1500219
_cons | 116.9741 1.048984 111.51 0.000 114.9164 119.0319
------------------------------------------------------------------------------

. est store model1

. regress bwght faminc

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 1, 1386) = 16.65
Model | 6819.0527 1 6819.0527 Prob > F = 0.0000
Residual | 567792.667 1386 409.662819 R-squared = 0.0119
-------------+------------------------------ Adj R-squared = 0.0112
Total | 574611.72 1387 414.283864 Root MSE = 20.24

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
faminc | .1183234 .0290016 4.08 0.000 .0614317 .1752152
_cons | 115.265 1.001901 115.05 0.000 113.2996 117.2304
------------------------------------------------------------------------------

. est store model2

. regress bwght cigs

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 1, 1386) = 32.24
Model | 13060.4194 1 13060.4194 Prob > F = 0.0000
Residual | 561551.3 1386 405.159668 R-squared = 0.0227
-------------+------------------------------ Adj R-squared = 0.0220
Total | 574611.72 1387 414.283864 Root MSE = 20.129

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cigs | -.5137721 .0904909 -5.68 0.000 -.6912861 -.3362581
_cons | 119.7719 .5723407 209.27 0.000 118.6492 120.8946
------------------------------------------------------------------------------

. est store model3

. esttab model1 model2 model3, se r2 aic bic label


--------------------------------------------------------------------
(1) (2) (3)
bwght bwght bwght
--------------------------------------------------------------------
cigs -0.463*** -0.514***
(0.0916) (0.0905)

faminc 0.0928** 0.118***


(0.0292) (0.0290)

Constant 117.0*** 115.3*** 119.8***


(1.049) (1.002) (0.572)
--------------------------------------------------------------------
Observations 1388 1388 1388
R-squared 0.030 0.012 0.023
AIC 12266.8 12290.3 12274.9
BIC 12282.5 12300.7 12285.4
--------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001

. regress bwght cigs faminc

Source | SS df MS Number of obs = 1388


-------------+------------------------------ F( 2, 1385) = 21.27
Model | 17126.2088 2 8563.10442 Prob > F = 0.0000
Residual | 557485.511 1385 402.516614 R-squared = 0.0298
-------------+------------------------------ Adj R-squared = 0.0284
Total | 574611.72 1387 414.283864 Root MSE = 20.063

------------------------------------------------------------------------------
bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
cigs | -.4634075 .0915768 -5.06 0.000 -.6430518 -.2837633
faminc | .0927647 .0291879 3.18 0.002 .0355075 .1500219
_cons | 116.9741 1.048984 111.51 0.000 114.9164 119.0319
------------------------------------------------------------------------------

. test cigs = 2*faminc

( 1) cigs - 2*faminc = 0

F( 1, 1385) = 42.35
Prob > F = 0.0000

Question : 4.2

. gen log_wage = log(wage)

. regress log_wage educ exper tenure

Source | SS df MS Number of obs = 900


-------------+------------------------------ F( 3, 896) = 52.15
Model | 23.6080086 3 7.86933619 Prob > F = 0.0000
Residual | 135.21098 896 .150905112 R-squared = 0.1486
-------------+------------------------------ Adj R-squared = 0.1458
Total | 158.818989 899 .176661834 Root MSE = .38847
------------------------------------------------------------------------------
log_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0731166 .0066357 11.02 0.000 .0600933 .0861399
exper | .0153578 .0034253 4.48 0.000 .0086353 .0220804
tenure | .0129641 .0026307 4.93 0.000 .007801 .0181272
_cons | 5.528329 .1127946 49.01 0.000 5.306957 5.749702
------------------------------------------------------------------------------

. test educ = exper

( 1) educ - exper = 0

F( 1, 896) = 95.74
Prob > F = 0.0000

. regress log_wage educ exper tenure

Source | SS df MS Number of obs = 900


-------------+------------------------------ F( 3, 896) = 52.15
Model | 23.6080086 3 7.86933619 Prob > F = 0.0000
Residual | 135.21098 896 .150905112 R-squared = 0.1486
-------------+------------------------------ Adj R-squared = 0.1458
Total | 158.818989 899 .176661834 Root MSE = .38847

------------------------------------------------------------------------------
log_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0731166 .0066357 11.02 0.000 .0600933 .0861399
exper | .0153578 .0034253 4.48 0.000 .0086353 .0220804
tenure | .0129641 .0026307 4.93 0.000 .007801 .0181272
_cons | 5.528329 .1127946 49.01 0.000 5.306957 5.749702
------------------------------------------------------------------------------

. est store unrestricted

. regress log_wage educ tenure

Source | SS df MS Number of obs = 900


-------------+------------------------------ F( 2, 897) = 66.75
Model | 20.5743713 2 10.2871857 Prob > F = 0.0000
Residual | 138.244617 897 .15411886 R-squared = 0.1295
-------------+------------------------------ Adj R-squared = 0.1276
Total | 158.818989 899 .176661834 Root MSE = .39258

------------------------------------------------------------------------------
log_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0594246 .0059536 9.98 0.000 .0477399 .0711093
tenure | .0158379 .0025785 6.14 0.000 .0107773 .0208984
_cons | 5.870049 .0840306 69.86 0.000 5.70513 6.034969
------------------------------------------------------------------------------

. est store unrestricted

. regress log_wage educ exper

Source | SS df MS Number of obs = 900


-------------+------------------------------ F( 2, 897) = 64.41
Model | 19.9433397 2 9.97166984 Prob > F = 0.0000
Residual | 138.875649 897 .154822351 R-squared = 0.1256
-------------+------------------------------ Adj R-squared = 0.1236
Total | 158.818989 899 .176661834 Root MSE = .39347

------------------------------------------------------------------------------
log_wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .075865 .0066975 11.33 0.000 .0627204 .0890095
exper | .0194704 .0033649 5.79 0.000 .0128664 .0260745
_cons | 5.537798 .1142326 48.48 0.000 5.313604 5.761993
------------------------------------------------------------------------------

. est store unrestricted

. ovtest

Ramsey RESET test using powers of the fitted values of log_wage


Ho: model has no omitted variables
F(3, 894) = 0.24
Prob > F = 0.8704
Question 4.3

. describe

Contains data from H:\sem 8\economertics\money_uk.dta


obs: 38
vars: 9 14 Apr 2010 16:50
size: 1,292
-----------------------------------------------------------------------------------
---------------------
storage display value
variable name type format label variable label
-----------------------------------------------------------------------------------
---------------------
cons long %12.0g CONS
disp long %12.0g DISP
gdp float %9.0g GDP
gfcf long %12.0g GFCF
m0 int %8.0g M0
m4 long %12.0g M4
r float %9.0g R
tbill float %9.0g TBILL
datevar float %ty
-----------------------------------------------------------------------------------
---------------------
Sorted by: datevar

. summarize

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
cons | 35 181645 159429.9 19826 516793
disp | 38 328553.2 97173.68 193368 523699
gdp | 38 71.58421 17.74979 43.9 106.1
gfcf | 38 84732.05 22668.43 45191 130112
m0 | 29 13392.38 6605.141 3917 26413
-------------+--------------------------------------------------------
m4 | 35 219723 225587.3 14751 719869
r | 35 7.629714 3.18086 3.31 17.75
tbill | 26 10.35846 3.27883 4.95 16.49
datevar | 38 1978.5 11.11306 1960 1997

. gen real_m = m4 / gdp


(3 missing values generated)

. gen log_realm = log(real_m)


(3 missing values generated)

. gen log_gdp = log(gdp)

. regress log_realm log_gdp r

Source | SS df MS Number of obs = 35


-------------+------------------------------ F( 2, 32) = 415.77
Model | 37.7837615 2 18.8918808 Prob > F = 0.0000
Residual | 1.4540081 32 .045437753 R-squared = 0.9629
-------------+------------------------------ Adj R-squared = 0.9606
Total | 39.2377696 34 1.15405205 Root MSE = .21316

------------------------------------------------------------------------------
log_realm | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_gdp | 4.67775 .1623411 28.81 0.000 4.347072 5.008428
r | .0019739 .0115045 0.17 0.865 -.0214601 .0254079
_cons | -12.68571 .70485 -18.00 0.000 -14.12144 -11.24998
------------------------------------------------------------------------------

. test log_gdp > 0


> not found
r(111);

. test log_gdp = 1

( 1) log_gdp = 1

F( 1, 32) = 513.22
Prob > F = 0.0000

. test r > 0
> not found
r(111);

Question 4.4

. summarize

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
y | 153 4557.257 1437.844 2238.6 7365.6
k | 153 230.3366 136.583 53.36 459.09
l | 153 18.88131 1.08477 16.11 21.12
datevar | 153 76 44.3114 0 152

. gen log_y = log(y)


. gen log_k = log(k)

. gen log_l = log(l)

. regress log_y log_k log_l

Source | SS df MS Number of obs = 153


-------------+------------------------------ F( 2, 150) = 1696.19
Model | 16.1082897 2 8.05414487 Prob > F = 0.0000
Residual | .712254305 150 .004748362 R-squared = 0.9577
-------------+------------------------------ Adj R-squared = 0.9571
Total | 16.820544 152 .110661474 Root MSE = .06891

------------------------------------------------------------------------------
log_y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_k | .4420452 .0081298 54.37 0.000 .4259815 .4581089
log_l | .1634469 .1015977 1.61 0.110 -.0373006 .3641945
_cons | 5.588666 .2871037 19.47 0.000 5.021376 6.155955
------------------------------------------------------------------------------

. test log_k + log_l = 1

( 1) log_k + log_l = 1

F( 1, 150) = 15.82
Prob > F = 0.0001

You might also like