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

Percobaan 19 Nov

The document outlines a series of statistical analyses conducted using Stata software, including data import, spatial weighting, and regression analysis. It details the setup of a panel data structure with 113 entities over six years, along with various statistical outputs such as means, standard deviations, and regression coefficients. The analysis includes fixed-effects and spatial autoregressive models to assess the relationships between multiple variables.

Uploaded by

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

Percobaan 19 Nov

The document outlines a series of statistical analyses conducted using Stata software, including data import, spatial weighting, and regression analysis. It details the setup of a panel data structure with 113 entities over six years, along with various statistical outputs such as means, standard deviations, and regression coefficients. The analysis includes fixed-effects and spatial autoregressive models to assess the relationships between multiple variables.

Uploaded by

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

Saturday November 19 14:58:04 2022 Page 1

___ ____ ____ ____ ____(R)


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

User: rima

___ ____ ____ ____ ____ (R)


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

Single-user Stata perpetual license:


Serial number: 10699393
Licensed to: Andrey

Notes:
1. Unicode is supported; see help unicode_advice.

1 . use "C:\Users\winan\Documents\Analisis Stata\data longlat.dta", clear

2 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

3 . spmat idistance W_invn LONGITUDE LATITUDE, id(id) normalize(row)

4 . spmat summarize W_invn

Summary of spatial-weighting object W_invn

Matrix Description

Dimensions 113 x 113


Stored as 113 x 113
Values
min 0
min>0 .0004474
mean .0088496
max .7718628

5 .
end of do-file

6 . clear

7 . import excel "C:\Users\winan\Documents\Analisis Stata\EXPERIMEN1.xlsx", sheet("Sheet1") firstro

8 . save "C:\Users\winan\Documents\Analisis Stata\eksperimen1.dta"


file C:\Users\winan\Documents\Analisis Stata\eksperimen1.dta saved

9 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"
Saturday November 19 14:58:04 2022 Page 2

10 . xtset id Tahun
panel variable: id (strongly balanced)
time variable: Tahun, 2015 to 2020
delta: 1 unit

11 .
end of do-file

12 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

13 . global varxpanel LN_PDRBAWAL PAD DAPER BP BB BM IPM JALAN MANPOWER

14 .
end of do-file

15 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

16 . xtdescribe

id: 1, 2, ..., 113 n = 113


Tahun: 2015, 2016, ..., 2020 T = 6
Delta(Tahun) = 1 unit
Span(Tahun) = 6 periods
(id*Tahun uniquely identifies each observation)

Distribution of T_i: min 5% 25% 50% 75% 95% max


6 6 6 6 6 6 6

Freq. Percent Cum. Pattern

113 100.00 100.00 111111

113 100.00 XXXXXX

17 . xtsum Y

Variable Mean Std. Dev. Min Max Observations

Y overall 3.045528 4.259662 -22.88563 20.71432 N = 678


between 1.235607 -1.710834 8.394264 n = 113
within 4.0779 -18.78309 18.4807 T = 6

18 .
end of do-file

19 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

20 . xtsum Y $varxpanel

Variable Mean Std. Dev. Min Max Observations

Y overall 3.045528 4.259662 -22.88563 20.71432 N = 678


between 1.235607 -1.710834 8.394264 n = 113
within 4.0779 -18.78309 18.4807 T = 6

LN_PDR~L overall 10.12022 .5901368 9.266626 12.6534 N = 678


between .5867275 9.36871 12.53894 n = 113
within .0809613 9.788217 10.33521 T = 6

PAD overall 19.00433 10.28203 6.30758 61.40133 N = 678


between 10.16966 7.554531 59.2564 n = 113
within 1.749846 12.29091 31.4806 T = 6
Saturday November 19 14:58:04 2022 Page 3

DAPER overall 61.95994 22.44744 20.92107 382.9376 N = 678


between 10.22534 25.79344 116.4236 n = 113
within 20.00255 3.18799 328.4739 T = 6

BP overall 42.94683 6.494764 22.56855 64.03283 N = 678


between 4.104546 31.05635 51.18459 n = 113
within 5.0457 24.90872 59.61927 T = 6

BB overall 23.52526 7.552508 0 50.11245 N = 678


between 6.54125 11.63992 41.41475 n = 113
within 3.816862 -1.201963 34.47629 T = 6

BM overall 18.18267 5.706019 4.291466 41.26614 N = 678


between 3.983128 11.61737 34.28747 n = 113
within 4.100062 4.249354 33.19107 T = 6

IPM overall 71.19736 5.275369 58.18 86.65 N = 678


between 5.20847 60.46833 85.79 n = 113
within .9495872 68.90903 73.42903 T = 6

JALAN overall 80.8147 18.52427 0 100 N = 678


between 12.07368 45.50552 99.97455 n = 113
within 14.08727 -1.803919 133.0202 T = 6

MANPOWER overall 94.19543 2.696463 85.2 99.09 N = 678


between 2.503672 87.05667 98.68167 n = 113
within 1.024126 89.46377 96.55877 T = 6

21 .
end of do-file

22 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

23 . ssc install xtcsd


checking xtcsd consistency and verifying not already installed...
all files already exist and are up to date.

24 .
end of do-file

25 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

26 . reg Y $varxpanel

Source SS df MS Number of obs = 678


F(9, 668) = 17.70
Model 2365.59688 9 262.844098 Prob > F = 0.0000
Residual 9918.37802 668 14.8478713 R-squared = 0.1926
Adj R-squared = 0.1817
Total 12283.9749 677 18.1447192 Root MSE = 3.8533

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

LN_PDRBAWAL -.5009707 .2978943 -1.68 0.093 -1.085893 .0839512


PAD -.0378062 .0230769 -1.64 0.102 -.0831181 .0075058
DAPER .0046273 .0069686 0.66 0.507 -.0090557 .0183103
BP .0740531 .0236669 3.13 0.002 .0275826 .1205237
BB .0131512 .0279802 0.47 0.638 -.0417885 .0680909
BM .2534522 .0283319 8.95 0.000 .197822 .3090824
IPM -.0175119 .0410665 -0.43 0.670 -.0981469 .063123
JALAN .0257826 .0085412 3.02 0.003 .0090118 .0425535
MANPOWER .2860522 .0557979 5.13 0.000 .1764919 .3956125
Saturday November 19 14:58:04 2022 Page 4

_cons -27.33255 6.082453 -4.49 0.000 -39.27558 -15.38953

27 .
end of do-file

28 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

29 . xtreg Y $varxpanel, fe

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


Group variable: id Number of groups = 113

R-sq: Obs per group:


within = 0.5494 min = 6
between = 0.0009 avg = 6.0
overall = 0.0101 max = 6

F(9,556) = 75.31
corr(u_i, Xb) = -0.9902 Prob > F = 0.0000

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

LN_PDRBAWAL -43.88111 4.067973 -10.79 0.000 -51.87159 -35.89064


PAD -.0639307 .0754822 -0.85 0.397 -.2121959 .0843346
DAPER -.0033567 .0058912 -0.57 0.569 -.0149285 .0082151
BP -.0593075 .0329501 -1.80 0.072 -.1240295 .0054145
BB .0626799 .0478054 1.31 0.190 -.0312214 .1565813
BM .1474755 .0349496 4.22 0.000 .0788261 .2161248
IPM 1.701591 .3502547 4.86 0.000 1.013607 2.389576
JALAN .022403 .0084041 2.67 0.008 .0058953 .0389107
MANPOWER 1.419035 .1205008 11.78 0.000 1.182343 1.655728
_cons 190.3202 30.14775 6.31 0.000 131.1028 249.5376

sigma_u 23.19977
sigma_e 3.0206769
rho .98332982 (fraction of variance due to u_i)

F test that all u_i=0: F(112, 556) = 4.74 Prob > F = 0.0000

30 .
end of do-file

31 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

32 . xsmle Y $varxpanel, wmat(W_invn) mod(sar) hausman nolog


... estimating fixed-effects model to perform Hausman test

SAR with random-effects Number of obs = 678

Group variable: id Number of groups = 113


Time variable: Tahun Panel length = 6

R-sq: within = 0.6176


between = 0.0449
overall = 0.5601
Saturday November 19 14:58:05 2022 Page 5

Log-likelihood = -1600.5723

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

Main
LN_PDRBAWAL -.2116657 .2299008 -0.92 0.357 -.6622631 .2389316
PAD -.0102704 .0172329 -0.60 0.551 -.0440463 .0235054
DAPER -.0018519 .0044635 -0.41 0.678 -.0106002 .0068964
BP .0019687 .0163953 0.12 0.904 -.0301656 .034103
BB .0184042 .0204076 0.90 0.367 -.0215939 .0584023
BM .0383794 .0205132 1.87 0.061 -.0018258 .0785845
IPM .0178041 .0314165 0.57 0.571 -.0437711 .0793792
JALAN .0107487 .005742 1.87 0.061 -.0005054 .0220028
MANPOWER .0904225 .0423284 2.14 0.033 .0074604 .1733845
_cons -9.160461 4.639162 -1.97 0.048 -18.25305 -.0678709

Spatial
rho .9088054 .0243767 37.28 0.000 .8610278 .9565829

Variance
lgt_theta 1.437518 .38828 3.70 0.000 .676503 2.198533
sigma2_e 5.802101 .3489306 16.63 0.000 5.118209 6.485992

Ho: difference in coeffs not systematic chi2(10) = 43.77 Prob>=chi2 = 0.0000

33 .
end of do-file

34 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

35 . xsmle Y $varxpanel, wmat(W_invn) mod(sar) hausman nolog rob


... estimating fixed-effects model to perform Hausman test

SAR with random-effects Number of obs = 678

Group variable: id Number of groups = 113


Time variable: Tahun Panel length = 6

R-sq: within = 0.6176


between = 0.0449
overall = 0.5601

Log-pseudolikelihood = -1600.5723
(Std. Err. adjusted for 113 clusters in id)

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

Main
LN_PDRBAWAL -.2116657 .2344955 -0.90 0.367 -.6712685 .247937
PAD -.0102704 .0201419 -0.51 0.610 -.0497479 .029207
DAPER -.0018519 .0027253 -0.68 0.497 -.0071934 .0034895
BP .0019687 .0140603 0.14 0.889 -.025589 .0295264
BB .0184042 .0179849 1.02 0.306 -.0168457 .053654
BM .0383794 .0202972 1.89 0.059 -.0014023 .0781611
IPM .0178041 .0292979 0.61 0.543 -.0396187 .0752269
JALAN .0107487 .0073509 1.46 0.144 -.0036587 .0251562
MANPOWER .0904225 .0590804 1.53 0.126 -.0253729 .2062178
_cons -9.160461 5.494289 -1.67 0.095 -19.92907 1.608148

Spatial
rho .9088054 .0331123 27.45 0.000 .8439064 .9737043
Saturday November 19 14:58:05 2022 Page 6

Variance
lgt_theta 1.437518 .5746366 2.50 0.012 .3112508 2.563785
sigma2_e 5.802101 1.166517 4.97 0.000 3.51577 8.088432

Ho: difference in coeffs not systematic chi2(10) = 43.77 Prob>=chi2 = 0.0000

36 .
end of do-file

37 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

38 . estat ic

Akaike's information criterion and Bayesian information criterion

Model Obs ll(null) ll(model) df AIC BIC

. 678 . -1600.572 13 3227.145 3285.894

Note: N=Obs used in calculating BIC; see [R] BIC note.

39 . estimates store SARpnel

40 .
end of do-file

41 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

42 . xsmle Y $varxpanel, emat(W_invn) mod(sem) hausman nolog


... estimating fixed-effects model to perform Hausman test

SEM with random-effects Number of obs = 678

Group variable: id Number of groups = 113


Time variable: Tahun Panel length = 6

R-sq: within = 0.0141


between = 0.0559
overall = 0.0154

Log-likelihood = -1601.7339

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

Main
LN_PDRBAWAL -.1978435 .23471 -0.84 0.399 -.6578666 .2621797
PAD -.0065568 .0196726 -0.33 0.739 -.0451145 .0320008
DAPER -.0034049 .0063847 -0.53 0.594 -.0159186 .0091088
BP -.0172347 .0188048 -0.92 0.359 -.0540914 .0196219
BB .0236931 .0225634 1.05 0.294 -.0205304 .0679166
BM .0121965 .0224666 0.54 0.587 -.0318371 .0562302
IPM .0248301 .035463 0.70 0.484 -.0446762 .0943363
JALAN .0086315 .0058547 1.47 0.140 -.0028436 .0201066
MANPOWER .0697659 .0431725 1.62 0.106 -.0148507 .1543824
_cons -3.868094 4.913066 -0.79 0.431 -13.49753 5.761339

Spatial
lambda .9331499 .0193596 48.20 0.000 .8952058 .9710939

Variance
Saturday November 19 14:58:06 2022 Page 7

ln_phi -2.404509 .4167506 -5.77 0.000 -3.221325 -1.587693


sigma2_e 5.769731 .3464651 16.65 0.000 5.090672 6.44879

Ho: difference in coeffs not systematic chi2(10) = 70.45 Prob>=chi2 = 0.0000

43 . estat ic

Akaike's information criterion and Bayesian information criterion

Model Obs ll(null) ll(model) df AIC BIC

. 678 . -1601.734 13 3229.468 3288.217

Note: N=Obs used in calculating BIC; see [R] BIC note.

44 . estimates store SEMpnel

45 .
end of do-file

46 . do "C:\Users\winan\AppData\Local\Temp\STD00000000.tmp"

47 . estimates table SARpnel SEMpnel, b

Variable SARpnel SEMpnel

Main
LN_PDRBAWAL -.21166574 -.19784347
PAD -.01027042 -.00655683
DAPER -.00185192 -.00340489
BP .00196871 -.01723474
BB .01840419 .02369309
BM .03837936 .01219653
IPM .01780406 .02483006
JALAN .01074874 .00863153
MANPOWER .09042245 .06976586
_cons -9.1604609 -3.8680935

Spatial
rho .90880536
lambda .93314988

Variance
lgt_theta 1.4375178
sigma2_e 5.8021008 5.7697309
ln_phi -2.4045094

48 .
end of do-file

49 .

You might also like