Log

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Friday March 18 07:16:1 2022 Page 1

___
____ ____ ____ ____(R)
/__ / ____/ / ____/
___/ / /___/ / /___/
Statistics/Data Analysis

F(3, 86) = 503.12


name: <unnamed>
log: C:\Users\rdliv\Downloads\log.smcl
log type: smcl
opened on: 18 Mar 2022, 07:13:29

1 . import excel "C:\Users\rdliv\Downloads\data3.xls", sheet("Table1") firstrow

2 . do "C:\Users\rdliv\Downloads\Tugas data3.do"

3 . *Analisis data panel: Common Effect, Fixed Effect, Random Effect


4 .
5 . *Common Effect: observasi antar waktu independent satu sama lain
6 . reg TC Q PF LF

Source SS df MS Number of obs = 90


TC Coef. Std. Err. t F(3, 86)
P>|t| [95% Conf. = Interval]
503.12
Model 1.1966e+14 3 3.9885e+13 Prob > F = 0.0000
Residual
Q 6.8177e+12
2026114 61806.9586 7.9276e+10
32.78 R-squared
0.000 1903246 = 0.9461
2148982
PF 1.225348 .1037217 11.81 Adj R-squared
0.000 1.019156 = 0.9442
1.43154
Total
LF 1.2647e+14
-3065753 696327.389 1.4210e+12
-4.40 Root MSE
0.000 -4450006 = -1681500
2.8e+05
_cons 1158559 360592.7 3.21 0.002 441724.6 1875394

7 . estimate store ols

8 .
9 . //setting data panel
10 . xtset Firm Year
panel variable: Firm (strongly balanced)
time variable: Year, 1970 to 1984
delta: 1 unit

11 .
12 . *Fixed Effects
13 . xtreg TC Q PF LF , fe

Fixed-effects (within) regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9294 min = 15
between = 0.9929 avg = 15.0
overall = 0.9112 max = 15

F(3,81) = 355.25
corr(u_i, Xb) = -0.9045 Prob > F = 0.0000

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

Q 3319023 171354.1 19.37 0.000 2978082 3659964


PF .7730709 .097319 7.94 0.000 .5794365 .9667053
LF -3797368 613773.1 -6.19 0.000 -5018584 -2576152
_cons 1077303 310799.2 3.47 0.001 458909.9 1695696

sigma_u 748483
sigma_e 210422.78
rho .92675366 (fraction of variance due to u_i)
Friday March 18 07:16:2 2022 Page
F test that all u_i=0: F(5, 81) = 14.60 Prob > F = 0.0000

14 . estimate store fixed

15 .
16 . *Random Effects
17 . xtreg TC Q PF LF , re

Random-effects GLS regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9037 min = 15
between = 0.9934 avg = 15.0
overall = 0.9432 max = 15

Wald chi2(3) = 883.50


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

TC Coef. Std. Err. z P>|z| [95% Conf. Interval]

Q 2288588 109493.7 20.90 0.000 2073984 2503192


PF 1.123591 .1034406 10.86 0.000 .9208516 1.326331
LF -3084994 725679.8 -4.25 0.000 -4507300 -1662688
_cons 1074293 377468 2.85 0.004 334469.3 1814117

sigma_u 107411.2
sigma_e 210422.78
rho .206704 (fraction of variance due to u_i)

18 . estimate store random

19 .
20 . *menyajikan tabel hasil estimasi berbagai model
21 . esttab ols fixed random using panel.rtf, replace se star (* 0.1 ** 0.05 *** 0.01) mtitle ("OLS"
(output written to panel.rtf)

22 .
23 . *Uji Hausman: memilih model
24 . xtreg TC Q PF LF , fe

Fixed-effects (within) regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9294 min = 15
between = 0.9929 avg = 15.0
overall = 0.9112 max = 15

F(3,81) = 355.25
corr(u_i, Xb) = -0.9045 Prob > F = 0.0000

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

Q 3319023 171354.1 19.37 0.000 2978082 3659964


PF .7730709 .097319 7.94 0.000 .5794365 .9667053
LF -3797368 613773.1 -6.19 0.000 -5018584 -2576152
_cons 1077303 310799.2 3.47 0.001 458909.9 1695696

sigma_u 748483
sigma_e 210422.78
rho .92675366 (fraction of variance due to u_i)

F test that all u_i=0: F(5, 81) = 14.60 Prob > F = 0.0000
Friday March 18 07:16:51 Page

25 . estimate store fixed

26 .
27 . xtreg TC Q PF LF , re

Random-effects GLS regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9037 min = 15
between = 0.9934 avg = 15.0
overall = 0.9432 max = 15

Wald chi2(3) = 883.50


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

TC Coef. Std. Err. z P>|z| [95% Conf. Interval]

Q 2288588 109493.7 20.90 0.000 2073984 2503192


PF 1.123591 .1034406 10.86 0.000 .9208516 1.326331
LF -3084994 725679.8 -4.25 0.000 -4507300 -1662688
_cons 1074293 377468 2.85 0.004 334469.3 1814117

sigma_u 107411.2
sigma_e 210422.78
rho .206704 (fraction of variance due to u_i)

28 . estimate store random

29 .
30 . hausman fixed random

Note: the rank of the differenced variance matrix (2) does not equal the number of coefficients be
problems computing the test. Examine the output of your estimators for anything unexpecte
coefficients are on a similar scale.

Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
fixed random Difference S.E.
Q 3319023 2288588 1030435 131808
PF .7730709 1.123591 -.3505204 .
LF -3797368 -3084994 -712373.5 .

b = consistent under Ho and Ha; obtained from xtreg


B = inconsistent under Ha, efficient under Ho; obtained from xtreg

Test: Ho: difference in coefficients not systematic

chi2(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 60.87
Prob>chi2 = 0.0000
(V_b-V_B is not positive definite)
Friday March 18 07:16:51 Page
31 . //Jika H0 ditolak direkomendasikan memilih FE
32 .
33 . *Hasil Esttab
34 . eststo: xtreg TC Q PF LF , fe

Fixed-effects (within) regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9294 min = 15
between = 0.9929 avg = 15.0
overall = 0.9112 max = 15

F(3,81) = 355.25
corr(u_i, Xb) = -0.9045 Prob > F = 0.0000

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

Q 3319023 171354.1 19.37 0.000 2978082 3659964


PF .7730709 .097319 7.94 0.000 .5794365 .9667053
LF -3797368 613773.1 -6.19 0.000 -5018584 -2576152
_cons 1077303 310799.2 3.47 0.001 458909.9 1695696

sigma_u 748483
sigma_e 210422.78
rho .92675366 (fraction of variance due to u_i)

F test that all u_i=0: F(5, 81) = 14.60 Prob > F = 0.0000
(est1 stored)

35 . eststo: xtreg TC Q PF LF , re

Random-effects GLS regression Number of obs = 90


Group variable: Firm Number of groups = 6

R-sq: Obs per group:


within = 0.9037 min = 15
between = 0.9934 avg = 15.0
overall = 0.9432 max = 15

Wald chi2(3) = 883.50


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

TC Coef. Std. Err. z P>|z| [95% Conf. Interval]

Q 2288588 109493.7 20.90 0.000 2073984 2503192


PF 1.123591 .1034406 10.86 0.000 .9208516 1.326331
LF -3084994 725679.8 -4.25 0.000 -4507300 -1662688
_cons 1074293 377468 2.85 0.004 334469.3 1814117

sigma_u 107411.2
sigma_e 210422.78
rho .206704 (fraction of variance due to u_i)

(est2 stored)
Friday March 18 07:16:51 Page
36 . eststo: hausman fixed random

Note: the rank of the differenced variance matrix (2) does not equal the number of coefficients be
problems computing the test. Examine the output of your estimators for anything unexpecte
coefficients are on a similar scale.

Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
fixed random Difference S.E.
Q 3319023 2288588 1030435 131808
PF .7730709 1.123591 -.3505204 .
LF -3797368 -3084994 -712373.5 .

b = consistent under Ho and Ha; obtained from xtreg


B = inconsistent under Ha, efficient under Ho; obtained from xtreg

Test: Ho: difference in coefficients not systematic

chi2(2) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 60.87
Prob>chi2 = 0.0000
(V_b-V_B is not positive definite)
(est3 stored)

37 . esttab

(1) (2) (3)


TC TC TC

Q 3319023.3*** 2288588.0*** 2288588.0***


(19.37) (20.90) (20.90)

PF 0.773*** 1.124*** 1.124***


(7.94) (10.86) (10.86)

LF -3797367.6*** -3084994.1*** -3084994.1***


(-6.19) (-4.25) (-4.25)

_cons 1077302.7*** 1074293.0** 1074293.0**


(3.47) (2.85) (2.85)

N 90 90 90

t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001

38 . esttab, se r2

(1) (2) (3)


TC TC TC

Q 3319023.3*** 2288588.0*** 2288588.0***


(171354.1) (109493.7) (109493.7)

PF 0.773*** 1.124*** 1.124***


(0.0973) (0.103) (0.103)

LF -3797367.6*** -3084994.1*** -3084994.1***


(613773.1) (725679.8) (725679.8)
Friday March 18 07:16:51 Page
_cons 1077302.7*** 1074293.0** 1074293.0**
(310799.2) (377468.0) (377468.0)

N 90 90 90
R-sq 0.929

Standard errors in parentheses


* p<0.05, ** p<0.01, *** p<0.001

39 .
end of do-file

40 . log close
name: <unnamed>
log: C:\Users\rdliv\Downloads\log.smcl
log type: smcl
closed on: 18 Mar 2022, 07:14:01

You might also like