Anda di halaman 1dari 11

Final Assignment

Cross-Sectional Data Analysis and


Interpretation from STATA Tests

Prepared for:
Professor Dr. A.K. Enamul Haque
Course Instructor: Basic Econometrics
Course Code: ECO465
Department of Economics

Prepared by:
Md. Raisul Azam
ID: 2016-1-88-005
MSSECO Program

East West University, Dhaka

April 15, 2016

~0~
Task 01: Establishing a Model from the Theories

Step A: Summarizing the Data Set


.summarize

VariableObsMeanStd.Dev.MinMax

wage5265.8961033.693086.5324.98
educ52612.562742.769022018
exper52617.0171113.57216151
tenure5265.1045637.224462044
nonwhite526.1026616.303805301

female526.4790875.50003801
married526.608365.488580401
numdep5261.0437261.26189106
smsa526.7224335.448224601
northcen526.2509506.433972801

south526.3555133.479124201
west526.1692015.375286701
construc526.0456274.208874301
ndurman526.1140684.31819701
trcommpu526.0437262.2046801

trade526.2870722.452826201
services526.1007605.301297801
profserv526.2585551.438257401
profocc526.3669202.482423301
clerocc526.1673004.373599101

servocc526.1406844.348026701
lwage5261.623268.5315382.63487833.218076
expersq526473.4354616.044812601
tenursq52678.15019199.434701936

Step B: Reviewing the Literature

Step C: Defining Dependent and Independent Variables

Step D: Defining Null Hypothesis

Step E: Determining the Regression Model using Box-Cox Power


Transformation
.boxcoxwageeductenurefemalenumdepwestconstrucprofocc,model(lhsonly)
Fittingcomparisonmodel

Iteration0:loglikelihood=1433.0604
Iteration1:loglikelihood=1264.5038
Iteration2:loglikelihood=1261.43
Iteration3:loglikelihood=1261.4202
Iteration4:loglikelihood=1261.4202

Fittingfullmodel

Iteration0:loglikelihood=1293.444
Iteration1:loglikelihood=1126.3577
Iteration2:loglikelihood=1118.9228
Iteration3:loglikelihood=1118.9052
Iteration4:loglikelihood=1118.9052

Numberofobs=526
LRchi2(7)=285.03
Loglikelihood=1118.9052Prob>chi2=0.000

wageCoef.Std.Err.zP>|z|[95%Conf.Interval]

/theta.0896224.05448661.640.100.1964142.0171693

Estimatesofscalevariantparameters

Coef.

Notrans
educ.0526018
tenure.0171921
female.2314339
numdep.0043716
west.1030992
construc.1209916
profocc.2085034
_cons.758114

/sigma.3462854

TestRestrictedLRstatisticPvalue
H0:loglikelihoodchi2Prob>chi2

theta=11292.6987347.590.000
theta=01120.23662.660.103
theta=11293.444349.080.000

~1~
Step F: Regressing the Dependent Variable on the Significant
Explanatory Variables
.regwageeductenurefemalenumdepconstrucprofocc

SourceSSdfMSNumberofobs=526
F(6,519)=58.02
Model2874.675266479.112543Prob>F=0.0000
Residual4285.739035198.257686Rsquared=0.4015
AdjRsquared=0.3945
Total7160.4142952513.6388844RootMSE=2.8736

wageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ.4028562.05349547.530.000.297762.5079504
tenure.154941.01789288.660.000.1197897.1900922
female1.558487.26087595.970.0002.070991.045985
numdep.1614874.10186761.590.114.0386361.361611
construc.6845955.60693071.130.260.50774731.876938
profocc1.815434.30586735.940.0001.2145442.416324
_cons.075033.7057310.110.9151.4614741.311408

Step G: Deriving Statistical Significance and Truncating the Model


.genlnwage=ln(wage)

.geneduc2=educ^2

.genlntenure=ln(tenure)
(163missingvaluesgenerated)

.genlnnumdep=ln(numdep)
(252missingvaluesgenerated)

Step H: Running the Regression again for Further Analysis


.reglnwageeduc2lntenurelnnumdep

SourceSSdfMSNumberofobs=185
F(3,181)=42.95
Model24.167915438.05597178Prob>F=0.0000
Residual33.9501204181.187569726Rsquared=0.4158
AdjRsquared=0.4062
Total58.1180358184.31585889RootMSE=.43309

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0037908.00050497.510.000.0027945.0047871
lntenure.2789956.0351427.940.000.2096548.3483363
lnnumdep.0012299.06788410.020.986.135176.1327162
_cons.6672994.11410965.850.000.4421432.8924556

Task 02: Testing for Normal Distribution of the


Error Terms

Step A: Plotting the Residual Values from the Model in a


Histogram

~2~
1.5
1
Density
.5
0

-1 -.5 0 .5 1 1.5
Residuals

Step B: Plotting the Residual Values from the Model for Kernel
Density Estimation

Kernel density estimate


1
.8
Density
.4 .6
.2
0

-1 0 1 2
Residuals

Kernel density estimate


Normal density
kernel = epanechnikov, bandwidth = 0.1216

Step C: Performing Skewness-Kurtosis Test on Residuals


.sktesterror

Skewness/KurtosistestsforNormality
joint
VariableObsPr(Skewness)Pr(Kurtosis)adjchi2(2)Prob>chi2

error1850.11210.22444.050.1320

~3~
Task 03: Testing for Heteroscedasticity via
Graphical Method
2
1.5
1
.5
0

0 100 200 300


educ2

e2 Fitted values
2
1.5
1
.5
0

0 1 2 3 4
lntenure

e2 Fitted values

~4~
2
1.5
1
.5
0

0 .5 1 1.5 2
lnnumdep

e2 Fitted values

Task 04: Testing for Heteroscedasticity through


Park Test
.genlne2=ln(e2)
(341missingvaluesgenerated)

.genlneduc2=ln(educ2)
(2missingvaluesgenerated)

.reglne2lneduc2

SourceSSdfMSNumberofobs=185
F(1,183)=1.16
Model7.7267179317.72671793Prob>F=0.2828
Residual1218.310281836.65743321Rsquared=0.0063
AdjRsquared=0.0009
Total1226.036991846.66324454RootMSE=2.5802

lne2Coef.Std.Err.tP>|t|[95%Conf.Interval]

lneduc2.4579027.42503931.080.283.38070491.29651
_cons5.5616682.1524352.580.0119.8084471.314888

.reglne2lntenure

SourceSSdfMSNumberofobs=185
F(1,183)=0.87
Model5.8100793415.81007934Prob>F=0.3518
Residual1220.226921836.66790664Rsquared=0.0047
AdjRsquared=0.0007
Total1226.036991846.66324454RootMSE=2.5822

lne2Coef.Std.Err.tP>|t|[95%Conf.Interval]

lntenure.193095.20685920.930.352.2150406.6012307
_cons3.543061.36521089.700.0004.2636262.822496

.reglne2lnnumdep

SourceSSdfMSNumberofobs=185
F(1,183)=0.03
Model.2223374371.222337437Prob>F=0.8556
Residual1225.814661836.69844075Rsquared=0.0002
AdjRsquared=0.0053
Total1226.036991846.66324454RootMSE=2.5881

lne2Coef.Std.Err.tP>|t|[95%Conf.Interval]

lnnumdep.0705507.38724160.180.856.6934816.834583
_cons3.29129.288291911.420.0003.8600942.722487

~5~
Task 05: Testing for Heteroscedasticity through
Glejser Test
.genabs_e=abs(error)
(341missingvaluesgenerated)

.regabs_elneduc2

SourceSSdfMSNumberofobs=185
F(1,183)=3.49
Model.263459611.26345961Prob>F=0.0632
Residual13.796961183.07539323Rsquared=0.0187
AdjRsquared=0.0134
Total14.0604206184.07641533RootMSE=.27458

abs_eCoef.Std.Err.tP>|t|[95%Conf.Interval]

lneduc2.0845537.04523161.870.063.0046887.1737962
_cons.0986309.22905660.430.667.5505622.3533005

.regabs_elntenure

SourceSSdfMSNumberofobs=185
F(1,183)=3.85
Model.2896115131.289611513Prob>F=0.0513
Residual13.7708091183.075250323Rsquared=0.0206
AdjRsquared=0.0152
Total14.0604206184.07641533RootMSE=.27432

abs_eCoef.Std.Err.tP>|t|[95%Conf.Interval]

lntenure.043111.02197531.960.051.0002465.0864685
_cons.2628696.03879746.780.000.1863218.3394174

.regabs_elnnumdep

SourceSSdfMSNumberofobs=185
F(1,183)=0.73
Model.0559611711.055961171Prob>F=0.3936
Residual14.0044595183.076527101Rsquared=0.0040
AdjRsquared=0.0015
Total14.0604206184.07641533RootMSE=.27664

abs_eCoef.Std.Err.tP>|t|[95%Conf.Interval]

lnnumdep.0353947.04139070.860.394.1170591.0462696
_cons.3476854.030814411.280.000.2868883.4084825

~6~
Task 06: Testing for Heteroscedasticity through
Goldfeld-Quandt Test
.regresslnwageeduc2in1/62

SourceSSdfMSNumberofobs=62
F(1,60)=12.73
Model4.7753115614.77531156Prob>F=0.0007
Residual22.512350260.375205836Rsquared=0.1750
AdjRsquared=0.1612
Total27.287661761.447338717RootMSE=.61254

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0044289.00124143.570.001.0019456.0069122
_cons.9929668.23059154.310.000.53171511.454219

.scalarRSS1=_result(4)

.scalarlistRSS1
RSS1=22.51235

.regresslnwageeduc2in124/185

SourceSSdfMSNumberofobs=62
F(1,60)=25.16
Model5.3482719815.34827198Prob>F=0.0000
Residual12.756722760.212612046Rsquared=0.2954
AdjRsquared=0.2837
Total18.104994761.296803192RootMSE=.4611

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0042965.00085665.020.000.0025829.00601
_cons.9007822.15920845.660.000.5823181.219246

.scalarRSS2=_result(4)

.scalarlistRSS2
RSS2=12.756723

.scalarR=RSS2/RSS1

.scalarlistR
R=.56665442

.scalarF=invfprob(62,62,0.005)

.scalarlistF
F=1.9402198
.regresslnwagelntenurein1/62

SourceSSdfMSNumberofobs=43
F(1,41)=25.10
Model7.0565520117.05655201Prob>F=0.0000
Residual11.52553641.281110635Rsquared=0.3798
AdjRsquared=0.3646
Total18.58208842.442430668RootMSE=.5302

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

lntenure.4661717.0930445.010.000.2782656.6540778
_cons1.068217.16966956.300.000.72556251.410872

.scalarRSS1=_result(4)

.scalarlistRSS1
RSS1=11.525536

.regresslnwagelntenurein124/185

SourceSSdfMSNumberofobs=47
F(1,45)=0.04
Model.0112183221.011218322Prob>F=0.8498
Residual13.916245245.309249894Rsquared=0.0008
AdjRsquared=0.0214
Total13.927463646.302770947RootMSE=.5561

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

lntenure.0179153.09406240.190.850.171536.2073667
_cons1.710008.154300711.080.0001.399232.020785

.scalarRSS2=_result(4)

.scalarlistRSS2
RSS2=13.916245

.scalarR=RSS2/RSS1

.scalarlistR
R=1.2074272

.scalarF=invfprob(62,62,0.005)

.scalarlistF
F=1.9402198

~7~
.regresslnwagenumdepin1/62

SourceSSdfMSNumberofobs=62
F(1,60)=2.07
Model.91100841.9110084Prob>F=0.1552
Residual26.376653360.439610889Rsquared=0.0334
AdjRsquared=0.0173
Total27.287661761.447338717RootMSE=.66303

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

numdep.1065732.07403221.440.155.2546597.0415134
_cons1.86192.106787417.440.0001.6483132.075526

.scalarRSS1=_result(4)

.scalarlistRSS1
RSS1=26.376653

.regresslnwagenumdepin124/185

SourceSSdfMSNumberofobs=62
F(1,60)=4.34
Model1.221414111.2214141Prob>F=0.0415
Residual16.883580660.28139301Rsquared=0.0675
AdjRsquared=0.0519
Total18.104994761.296803192RootMSE=.53046

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

numdep.0967864.04645572.080.041.1897117.0038611
_cons1.75571.086307920.340.0001.5830681.928351

.scalarRSS2=_result(4)

.scalarlistRSS2
RSS2=16.883581

.scalarR=RSS2/RSS1

.scalarlistR
R=.64009563

.scalarF=invfprob(62,62,0.005)

.scalarlistF
F=1.9402198

Task 07: Testing for Heteroscedasticity through


Breusch-Pagan Test
.reglnwageeduc2lntenurelnnumdep

SourceSSdfMSNumberofobs=185
F(3,181)=42.95
Model24.167915438.05597178Prob>F=0.0000
Residual33.9501204181.187569726Rsquared=0.4158
AdjRsquared=0.4062
Total58.1180358184.31585889RootMSE=.43309

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0037908.00050497.510.000.0027945.0047871
lntenure.2789956.0351427.940.000.2096548.3483363
lnnumdep.0012299.06788410.020.986.135176.1327162
_cons.6672994.11410965.850.000.4421432.8924556

.droperror

.predicterror,residuals
(341missingvaluesgenerated)

.hettest

BreuschPagan/CookWeisbergtestforheteroskedasticity
Ho:Constantvariance
Variables:fittedvaluesoflnwage

chi2(1)=6.14
Prob>chi2=0.0132

~8~
Task 08: Testing for Heteroscedasticity through
White Test
.imtest,white

White'stestforHo:homoskedasticity
againstHa:unrestrictedheteroskedasticity

chi2(9)=11.41
Prob>chi2=0.2488

Cameron&Trivedi'sdecompositionofIMtest

Sourcechi2dfp

Heteroskedasticity11.4190.2488
Skewness3.6630.3005
Kurtosis1.1210.2898

Total16.19130.2391

Task 09: Correcting Heteroscedasticity


.regresslnwageeduc2lntenurelnnumdep,robust

LinearregressionNumberofobs=185
F(3,181)=49.27
Prob>F=0.0000
Rsquared=0.4158
RootMSE=.43309

Robust
lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0037908.0005037.540.000.0027982.0047834
lntenure.2789956.03712317.520.000.2057459.3522452
lnnumdep.0012299.06629340.020.985.1320372.1295774
_cons.6672994.10227196.520.000.4655009.8690979

Task 10: Testing for Autocorrelation via Graphical


Method

Task 11: Testing for Autocorrelation through


Durbin-Watson Test

Task 12: Testing for Autocorrelation through


Breusch-Godfrey Test

Task 13: Correction of Autocorrelation

~9~
Task 14: Testing for the Specification Errors
through RESET Test
.reglnwageeduc2lntenurelnnumdep

SourceSSdfMSNumberofobs=185
F(3,181)=42.95
Model24.167915438.05597178Prob>F=0.0000
Residual33.9501204181.187569726Rsquared=0.4158
AdjRsquared=0.4062
Total58.1180358184.31585889RootMSE=.43309

lnwageCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ2.0037908.00050497.510.000.0027945.0047871
lntenure.2789956.0351427.940.000.2096548.3483363
lnnumdep.0012299.06788410.020.986.135176.1327162
_cons.6672994.11410965.850.000.4421432.8924556

.ovtest

RamseyRESETtestusingpowersofthefittedvaluesoflnwage
Ho:modelhasnoomittedvariables
F(3,178)=0.84
Prob>F=0.4745

Task 15: Testing for the Specification Errors


through Lagrange Multiplier Test
.regerroreducexpertenurenonwhitefemalemarriednumdepsmsanorthcensouthwestconstrucndurmantrcommputrades
>ervicesprofservprofocccleroccservocc

SourceSSdfMSNumberofobs=185
F(20,164)=3.66
Model10.486213420.524310669Prob>F=0.0000
Residual23.4639073164.143072605Rsquared=0.3089
AdjRsquared=0.2246
Total33.9501207184.184511525RootMSE=.37825

errorCoef.Std.Err.tP>|t|[95%Conf.Interval]

educ.0346403.01573322.200.029.065706.0035746
exper.0010971.00357670.310.759.0059652.0081594
tenure.017717.0054213.270.001.0284209.0070132
nonwhite.0479369.08277390.580.563.1155031.2113769
female.2681657.07282023.680.000.4119516.1243798
married.0875833.0863371.010.312.082892.2580586
numdep.0173969.03011760.580.564.0768652.0420713
smsa.0851873.06750291.260.209.0480994.218474
northcen.1037997.08810631.180.240.2777688.0701693
south.1095648.08096371.350.178.2694304.0503008
west.0325453.09326490.350.728.1516095.2167001
construc.0968662.14841540.650.515.3899175.1961851
ndurman.1941528.10142691.910.057.3944236.0061181
trcommpu.2924317.15846341.850.067.6053232.0204598
trade.379475.09671853.920.000.5704491.1885009
services.3329924.13916182.390.018.6077723.0582125
profserv.2178306.10443722.090.039.4240454.0116158
profocc.2566731.08730832.940.004.0842799.4290662
clerocc.0794226.10637430.750.456.1306171.2894623
servocc.0050938.10897910.050.963.2100892.2202767
_cons.7316953.24240173.020.003.25306471.210326

.predicte1,resid
(341missingvaluesgenerated)

.mataccummResid=errore1,noconstant
(obs=185)

.di"theLMteststatisticis:"e(N)*e(r2)
theLMteststatisticis:57.141166

~ 10 ~

Anda mungkin juga menyukai