You are on page 1of 4

Thursday November 10 11:05:28 2022 Page 1

___ ____ ____ ____ ____(R)


/__ / ____/ / ____/
___/ / /___/ / /___/
Statistics/Data Analysis

User: lat. ekonometrika p9

___ ____ ____ ____ ____ (R)


/__ / ____/ / ____/
___/ / /___/ / /___/ 14.2 Copyright 1985-2015 StataCorp LP
Statistics/Data Analysis StataCorp
4905 Lakeway Drive
MP - Parallel Edition College Station, Texas 77845 USA
800-STATA-PC http://www.stata.com
979-696-4600 stata@stata.com
979-696-4601 (fax)

Single-user 8-core Stata perpetual license:


Serial number: 10699393
Licensed to: Andrey

Notes:
1. Unicode is supported; see help unicode_advice.
2. More than 2 billion observations are allowed; see help obs_advice.
3. Maximum number of variables is set to 5000; see help set_maxvar.

1 . *(5 variables, 67 observations pasted into data editor)

2 . regress output size seed urea labor

Source SS df MS Number of obs = 67


F(4, 62) = 165.91
Model 318565613 4 79641403.2 Prob > F = 0.0000
Residual 29762296.8 62 480037.046 R-squared = 0.9146
Adj R-squared = 0.9090
Total 348327910 66 5277695.6 Root MSE = 692.85

output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 482.9488 2.08 0.042 39.79194 1970.594


seed 32.21611 12.77771 2.52 0.014 6.673845 57.75838
urea 2.21265 .9807641 2.26 0.028 .2521309 4.17317
labor .588713 .2345198 2.51 0.015 .1199146 1.057511
_cons 60.24324 128.7047 0.47 0.641 -197.0337 317.5202

3 . predict u, resid

4 . gen u2 = u^2

5 . predict yhat, xb

6 . twoway (scatter u2 yhat)

7 . hettes
command hettes is unrecognized
r(199);

8 . regress output size seed urea labor

Source SS df MS Number of obs = 67


F(4, 62) = 165.91
Model 318565613 4 79641403.2 Prob > F = 0.0000
Residual 29762296.8 62 480037.046 R-squared = 0.9146
Adj R-squared = 0.9090
Total 348327910 66 5277695.6 Root MSE = 692.85

output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 482.9488 2.08 0.042 39.79194 1970.594


seed 32.21611 12.77771 2.52 0.014 6.673845 57.75838
urea 2.21265 .9807641 2.26 0.028 .2521309 4.17317
labor .588713 .2345198 2.51 0.015 .1199146 1.057511
_cons 60.24324 128.7047 0.47 0.641 -197.0337 317.5202
Thursday November 10 11:05:29 2022 Page 2

9 . hettes
command hettes is unrecognized
r(199);

10 . hettest

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity


Ho: Constant variance
Variables: fitted values of output

chi2(1) = 19.77
Prob > chi2 = 0.0000

11 . ssc install lmhgl


host not found
http://fmwww.bc.edu/repec/bocode/l/ either
1) is not a valid URL, or
2) could not be contacted, or
3) is not a Stata download site (has no stata.toc file).
r(631);

12 . ssc install lmhgl


checking lmhgl consistency and verifying not already installed...
installing into c:\ado\plus\...
installation complete.

13 . lmhgl output size seed urea labor

Source SS df MS Number of obs = 67


F(4, 62) = 165.91
Model 318565613 4 79641403.2 Prob > F = 0.0000
Residual 29762296.8 62 480037.046 R-squared = 0.9146
Adj R-squared = 0.9090
Total 348327910 66 5277695.6 Root MSE = 692.85

output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 482.9488 2.08 0.042 39.79194 1970.594


seed 32.21611 12.77771 2.52 0.014 6.673845 57.75838
urea 2.21265 .9807641 2.26 0.028 .2521309 4.17317
labor .588713 .2345198 2.51 0.015 .1199146 1.057511
_cons 60.24324 128.7047 0.47 0.641 -197.0337 317.5202

==============================================================================
* OLS Glejser Lagrange Multiplier Heteroscedasticity Test
==============================================================================
Ho: No Heteroscedasticity - Ha: Heteroscedasticity

Glejser LM Test = 36.97322


Degrees of Freedom = 4.0
P-Value > Chi2(4) = 0.00000

14 . gen loutput = log(output)

15 . gen lsize = log(size)

16 . gen lseed = log(seed)

17 . gen lurea = log(urea)

18 . gen llabor = log(labor)


Thursday November 10 11:05:30 2022 Page 3

19 . regress loutput lsize lseed lurea llabor

Source SS df MS Number of obs = 67


F(4, 62) = 141.55
Model 61.9599111 4 15.4899778 Prob > F = 0.0000
Residual 6.78474798 62 .109431419 R-squared = 0.9013
Adj R-squared = 0.8949
Total 68.7446591 66 1.04158574 Root MSE = .3308

loutput Coef. Std. Err. t P>|t| [95% Conf. Interval]

lsize .6091247 .1191406 5.11 0.000 .370966 .8472835


lseed .1972609 .1229187 1.60 0.114 -.0484501 .442972
lurea .1865363 .0845357 2.21 0.031 .0175519 .3555207
llabor .0332838 .0692163 0.48 0.632 -.1050776 .1716452
_cons 6.213324 .607156 10.23 0.000 4.999637 7.427012

20 . predict e, resid

21 . gen e2 = e^2

22 . predict yduga, xb

23 . twoway (scatter u2 yhat) (scatter e2 yduga)

24 . hettest

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity


Ho: Constant variance
Variables: fitted values of loutput

chi2(1) = 0.43
Prob > chi2 = 0.5123

25 . lmhgl output size seed urea labor

Source SS df MS Number of obs = 67


F(4, 62) = 165.91
Model 318565613 4 79641403.2 Prob > F = 0.0000
Residual 29762296.8 62 480037.046 R-squared = 0.9146
Adj R-squared = 0.9090
Total 348327910 66 5277695.6 Root MSE = 692.85

output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 482.9488 2.08 0.042 39.79194 1970.594


seed 32.21611 12.77771 2.52 0.014 6.673845 57.75838
urea 2.21265 .9807641 2.26 0.028 .2521309 4.17317
labor .588713 .2345198 2.51 0.015 .1199146 1.057511
_cons 60.24324 128.7047 0.47 0.641 -197.0337 317.5202

==============================================================================
* OLS Glejser Lagrange Multiplier Heteroscedasticity Test
==============================================================================
Ho: No Heteroscedasticity - Ha: Heteroscedasticity

Glejser LM Test = 36.97322


Degrees of Freedom = 4.0
P-Value > Chi2(4) = 0.00000
Thursday November 10 11:05:31 2022 Page 4

26 . lmhgl loutput lsize lseed lurea llabor

Source SS df MS Number of obs = 67


F(4, 62) = 141.55
Model 61.9599111 4 15.4899778 Prob > F = 0.0000
Residual 6.78474798 62 .109431419 R-squared = 0.9013
Adj R-squared = 0.8949
Total 68.7446591 66 1.04158574 Root MSE = .3308

loutput Coef. Std. Err. t P>|t| [95% Conf. Interval]

lsize .6091247 .1191406 5.11 0.000 .370966 .8472835


lseed .1972609 .1229187 1.60 0.114 -.0484501 .442972
lurea .1865363 .0845357 2.21 0.031 .0175519 .3555207
llabor .0332838 .0692163 0.48 0.632 -.1050776 .1716452
_cons 6.213324 .607156 10.23 0.000 4.999637 7.427012

==============================================================================
* OLS Glejser Lagrange Multiplier Heteroscedasticity Test
==============================================================================
Ho: No Heteroscedasticity - Ha: Heteroscedasticity

Glejser LM Test = 3.43902


Degrees of Freedom = 4.0
P-Value > Chi2(4) = 0.48721

27 . regress output size seed urea labor

Source SS df MS Number of obs = 67


F(4, 62) = 165.91
Model 318565613 4 79641403.2 Prob > F = 0.0000
Residual 29762296.8 62 480037.046 R-squared = 0.9146
Adj R-squared = 0.9090
Total 348327910 66 5277695.6 Root MSE = 692.85

output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 482.9488 2.08 0.042 39.79194 1970.594


seed 32.21611 12.77771 2.52 0.014 6.673845 57.75838
urea 2.21265 .9807641 2.26 0.028 .2521309 4.17317
labor .588713 .2345198 2.51 0.015 .1199146 1.057511
_cons 60.24324 128.7047 0.47 0.641 -197.0337 317.5202

28 . regress output size seed urea labor, robust

Linear regression Number of obs = 67


F(4, 62) = 144.30
Prob > F = 0.0000
R-squared = 0.9146
Root MSE = 692.85

Robust
output Coef. Std. Err. t P>|t| [95% Conf. Interval]

size 1005.193 526.8688 1.91 0.061 -48.00294 2058.389


seed 32.21611 10.70823 3.01 0.004 10.81068 53.62155
urea 2.21265 1.461778 1.51 0.135 -.709402 5.134703
labor .588713 .4680135 1.26 0.213 -.3468328 1.524259
_cons 60.24324 130.1242 0.46 0.645 -199.8714 320.3579

29 .

You might also like