Graphics CROSS TABULAR ANALYSIS (For Dummy Variable) : Application To Cross Sectional Data in Econometrics
Graphics CROSS TABULAR ANALYSIS (For Dummy Variable) : Application To Cross Sectional Data in Econometrics
Graphics CROSS TABULAR ANALYSIS (For Dummy Variable) : Application To Cross Sectional Data in Econometrics
ለአንድ variable (example Economi growth) ከተለያየ observation data (Ethiopia,kenya,gana…) በአንድ ጊዜ
(in 2012 ብቻ) የምንሰበስብ ከሆነ Cross sectional data ሆኖ primary data ነው፡፡
ለአንድ variable ከተለያየ observation data በአንድ ጊዜ ከልላ ከወሰድን Cross sectional data ሆኖ secondary
data ነው፡፡
ለአንድ variable ከአንድ observation data በተለያየ ጊዜ የምንሰበስብ ከሆነ Time serious data ነው፡፡
(8 vars, 51 obs)
.ed
. sum
-------------+---------------------------------------------------------
-------------+---------------------------------------------------------
education | 50 .9 .7889544 0 2
G| 0
H| 0
. ztest Consumption==5000
Prepared by yitbarek
Software practical training
One-sample z test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
------------------------------------------------------------------------------
Ha: mean < 5000 Ha: mean != 5000 Ha: mean > 5000
Pr(Z < z) = 0.0000 Pr(|Z| > |z|) = 0.0000 Pr(Z > z) = 1.0000
. ttest Consumption==5000
One-sample t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
------------------------------------------------------------------------------
Ha: mean < 5000 Ha: mean != 5000 Ha: mean > 5000
Pr(T < t) = 0.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 1.0000
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
(obs=50)
| Consum~n income
-------------+------------------
Consumption | 1.0000
| Key |
|-----------------|
| frequency |
| cell percentage |
Prepared by yitbarek
Software practical training
+-----------------+
| education
sex | 0 1 2| Total
-----------+---------------------------------+----------
0| 9 10 7| 26
-----------+---------------------------------+----------
1| 9 9 6| 24
-----------+---------------------------------+----------
Total | 18 19 13 | 50
Consumption | 1.0000
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
LR chi2(2) = 2.39
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
. mfx
Marginal effects after logit
y = Pr(education) (predict)
= .64477923
------------------------------------------------------------------------------
---------+--------------------------------------------------------------------
------------------------------------------------------------------------------
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
Hetroschedencity
------------------------------------------------------------------------------
chi2(1) = 4.73
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
Roboost regression
. rreg Consumption income age wealth sex education This is the last option
Prepared by yitbarek
Software practical training
F( 5, 44) = 139.22
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
------------------------------------------------------------------------------
-------------+----------------------------------------------------------------
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
. qnorm reside
. replace G = 1 in 1
. replace G = 2 in 2
. replace G = 3 in 3
. replace G = 45 in 4
Prepared by yitbarek
Software practical training
. replace G = 4 in 4
. replace G = 5 in 5
. replace G = 6 in 6
. replace G = 7 in 7
. replace G = 8 in 8
. replace G = 9 in 9
. replace G = 0 in 10
. replace G = 10 in 10
. replace G = 11 in 11
. replace G = 12 in 12
Prepared by yitbarek
Software practical training
. replace G = 14 in 13
. replace G = 13 in 13
. replace G = 14 in 14
. replace G = 151 in 15
. replace G = 15 in 15
. replace G = 16 in 16
. replace G = 17 in 17
. replace G = 18 in 18
. replace G = 19 in 19
Prepared by yitbarek
Software practical training
. replace G = 20 in 20
. replace G = 21 in 21
. replace G = 22 in 22
. replace G = 23 in 23
. replace G = 24 in 24
. replace G = 25 in 25
. replace G = 26 in 26
. replace G = 27 in 27
. replace G = 28 in 28
. replace G = 29 in 29
Prepared by yitbarek
Software practical training
. replace G = 30 in 30
. replace G = 32 in 31
. replace G = 312 in 31
. replace G = 31 in 31
. replace G = 1 in 32
. replace G = 32 in 32
. replace G = 33 in 33
. replace G = 34 in 34
. replace G = 35 in 35
Prepared by yitbarek
Software practical training
. replace G = 36 in 36
. replace G = 37 in 37
. replace G = 37 in 38
. replace G = 38 in 38
. replace G = 39 in 39
. replace G = 40 in 40
. replace G = 41 in 41
. replace G = 42 in 42
. replace G = 42 in 43
. replace G = 43 in 43
Prepared by yitbarek
Software practical training
. replace G = 44 in 44
. replace G = 45 in 45
. replace G = 46 in 46
. replace G = 47 in 47
. replace G = 48 in 48
. replace G = 49 in 49
. replace G = 50 in 50
rename G year
. tsset year
time variable: year, 1 to 50
Prepared by yitbarek
Software practical training
delta: 1 unit
estat bgodfrey
. linktest
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
Consumption | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_hat | .9738604 .1249117 7.80 0.000 .7225704 1.22515
_hatsq | 4.03e-06 .0000185 0.22 0.828 -.0000331 .0000412
_cons | 30.54092 173.3982 0.18 0.861 -318.2912 379.373
------------------------------------------------------------------------------
Consumption | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
income | .7147582 .0344614 20.74 0.000 .6453057 .7842107
age | 6.708642 3.70608 1.81 0.077 -.7604719 14.17776
Prepared by yitbarek
Software practical training
. vif multicollinearity
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
poor | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhsize | .0732773 .0039137 18.72 0.000 .0656001 .0809546
food | -.000682 .0000265 -25.78 0.000 -.0007339 -.0006301
ageh | .0008127 .0006396 1.27 0.204 -.0004419 .0020673
sexh | -.0112448 .0234336 -0.48 0.631 -.0572123 .0347227
_cons | .1966898 .0410728 4.79 0.000 .1161211 .2772585
------------------------------------------------------------------------------
. hettest
Prepared by yitbarek
Software practical training
chi2(1) = 4.56
Prob > chi2 = 0.0327
------------------------------------------------------------------------------
poor | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhsize | 1.719588 .1220925 14.08 0.000 1.480292 1.958885
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
poor | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhsize | 5.582231 .6815485 14.08 0.000 4.394227 7.091418
food | .9666838 .0023234 -14.10 0.000 .9621407 .9712483
ageh | 1.022885 .006997 3.31 0.001 1.009263 1.036691
sexh | .7579128 .1919077 -1.09 0.274 .4614135 1.244939
_cons | .1628501 .0726161 -4.07 0.000 .0679564 .3902522
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Note: 187 failures and 2 successes completely determined.
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
poor | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
hhsize | .9063801 .0561507 16.14 0.000 .7963268 1.016433
food | -.0178587 .0010972 -16.28 0.000 -.0200092 -.0157082
ageh | .0126743 .0039009 3.25 0.001 .0050286 .0203199
sexh | -.1681744 .1442627 -1.17 0.244 -.4509242 .1145754
_cons | -1.020861 .2536082 -4.03 0.000 -1.517924 -.523798
------------------------------------------------------------------------------
Note: 325 failures and 24 successes completely determined.
. mfx
Marginal effects after probit
Prepared by yitbarek
Software practical training
y = Pr(poor) (predict)
= .00103803
------------------------------------------------------------------------------
variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X
---------+--------------------------------------------------------------------
hhsize | .0031582 .0018 1.76 0.079 -.000369 .006685 5.79158
food | -.0000622 .00003 -1.78 0.075 -.000131 6.3e-06 437.37
ageh | .0000442 .00003 1.57 0.116 -.000011 .000099 49.3271
sexh*| -.0006644 .00073 -0.91 0.362 -.002093 .000764 .725328
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1
. tsset year
time variable: year, 1990 to 2020
delta: 1 unit
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
. dfuller fd
Prepared by yitbarek
Software practical training
. dfuller d.fd
Prepared by yitbarek
Software practical training
Vector autoregression
Prepared by yitbarek
Software practical training
----------------------------------------------------------------
rgdp 11 4.8e+08 0.9879 2374.699 0.0000
fd 11 1.08661 0.9446 99.85629 0.0000
gcf 11 6.9e+08 0.8969 252.3678 0.0000
fdi 11 2.6e+08 0.8755 203.9881 0.0000
ge 11 1.3e+08 0.9475 523.8991 0.0000
----------------------------------------------------------------
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
rgdp |
rgdp |
L1. | 1.010628 .2050682 4.93 0.000 .6087019 1.412555
L2. | -.0381898 .2221547 -0.17 0.864 -.473605 .3972254
|
fd |
L1. | 1.07e+08 6.13e+07 1.74 0.081 -1.33e+07 2.27e+08
L2. | -6.92e+07 6.67e+07 -1.04 0.300 -2.00e+08 6.16e+07
|
gcf |
L1. | -.1774543 .1701311 -1.04 0.297 -.510905 .1559965
L2. | -.2096107 .2247472 -0.93 0.351 -.650107 .2308857
|
Prepared by yitbarek
Software practical training
fdi |
L1. | -.3050753 .3459094 -0.88 0.378 -.9830453 .3728948
L2. | .416203 .3061941 1.36 0.174 -.1839265 1.016332
|
ge |
L1. | .2327599 .6129942 0.38 0.704 -.9686866 1.434206
L2. | .5692975 .7752281 0.73 0.463 -.9501217 2.088717
|
_cons | -1.66e+08 9.42e+08 -0.18 0.860 -2.01e+09 1.68e+09
-------------+----------------------------------------------------------------
fd |
rgdp |
L1. | -7.93e-10 4.60e-10 -1.72 0.085 -1.70e-09 1.09e-10
L2. | -2.40e-10 4.99e-10 -0.48 0.631 -1.22e-09 7.37e-10
|
fd |
L1. | -.1427297 .1374723 -1.04 0.299 -.4121705 .1267111
L2. | .1022119 .1496937 0.68 0.495 -.1911823 .3956062
|
gcf |
L1. | 1.29e-09 3.82e-10 3.37 0.001 5.38e-10 2.03e-09
L2. | -1.12e-09 5.04e-10 -2.23 0.026 -2.11e-09 -1.34e-10
|
fdi |
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
|
ge |
L1. | -.9186361 .3241583 -2.83 0.005 -1.553975 -.2832975
L2. | -.7909533 .4099494 -1.93 0.054 -1.594439 .0125328
|
_cons | -1.94e+09 4.98e+08 -3.90 0.000 -2.92e+09 -9.65e+08
-------------+----------------------------------------------------------------
ge |
rgdp |
L1. | .0759575 .0568896 1.34 0.182 -.035544 .1874591
L2. | -.0559748 .0616297 -0.91 0.364 -.1767667 .0648172
|
fd |
L1. | 2.97e+07 1.70e+07 1.75 0.080 -3604538 6.30e+07
L2. | -3.01e+07 1.85e+07 -1.63 0.103 -6.64e+07 6122276
|
gcf |
L1. | .0196805 .0471974 0.42 0.677 -.0728247 .1121857
L2. | -.0516715 .0623489 -0.83 0.407 -.173873 .0705301
|
fdi |
L1. | -.0428689 .0959615 -0.45 0.655 -.2309499 .1452121
L2. | .0494793 .0849437 0.58 0.560 -.1170073 .2159659
|
Prepared by yitbarek
Software practical training
ge |
L1. | .9866718 .1700555 5.80 0.000 .6533692 1.319975
L2. | -.1452466 .2150621 -0.68 0.499 -.5667606 .2762674
|
_cons | 1.19e+08 2.61e+08 0.46 0.649 -3.93e+08 6.31e+08
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
D_rgdp |
_ce1 |
L1. | -.0887958 .0302234 -2.94 0.003 -.1480326 -.029559
|
rgdp |
LD. | .1500726 .2199029 0.68 0.495 -.2809292 .5810743
|
fd |
LD. | 1.14e+08 5.47e+07 2.08 0.038 6434668 2.21e+08
|
gcf |
LD. | .0647085 .1985564 0.33 0.745 -.3244549 .453872
|
fdi |
LD. | -.6281035 .2546112 -2.47 0.014 -1.127132 -.1290747
|
ge |
LD. | -.6623541 .6698702 -0.99 0.323 -1.975276 .6505674
|
_cons | 1.93e+08 1.24e+08 1.56 0.119 -4.95e+07 4.36e+08
Prepared by yitbarek
Software practical training
-------------+----------------------------------------------------------------
D_fd |
_ce1 |
L1. | -3.72e-10 1.04e-10 -3.59 0.000 -5.75e-10 -1.69e-10
|
rgdp |
LD. | -3.16e-10 7.54e-10 -0.42 0.675 -1.79e-09 1.16e-09
|
fd |
LD. | -.6780372 .1874461 -3.62 0.000 -1.045425 -.3106495
|
gcf |
LD. | 2.37e-09 6.80e-10 3.48 0.001 1.03e-09 3.70e-09
|
fdi |
LD. | -2.97e-09 8.73e-10 -3.40 0.001 -4.68e-09 -1.26e-09
|
ge |
LD. | 5.53e-10 2.30e-09 0.24 0.810 -3.95e-09 5.05e-09
|
_cons | -.463695 .4240684 -1.09 0.274 -1.294854 .3674639
-------------+----------------------------------------------------------------
D_gcf |
_ce1 |
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
Prepared by yitbarek
Software practical training
Cointegrating equations
Prepared by yitbarek
Software practical training
------------------------------------------------------------------------------
beta | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_ce1 |
rgdp | 1 . . . . .
fd | -8.80e-08 3.88e+08 -0.00 1.000 -7.61e+08 7.61e+08
gcf | 3.578237 .8072873 4.43 0.000 1.995983 5.160491
fdi | -6.68777 2.195395 -3.05 0.002 -10.99067 -2.384874
ge | -9.876562 2.626303 -3.76 0.000 -15.02402 -4.729103
_cons | -4.61e+09 . . . . .
Prepared by yitbarek