Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Chapter 5

The document presents a statistical analysis using Stata on the relationship between GDP, CPI, and imports (IMP) based on data from an Excel file. Key findings include a strong positive correlation between log_IMP and log_GDP, while log_CPI shows no significant influence from log_GDP. The analysis concludes that only imports significantly explain variations in CPI, while GDP does not.

Uploaded by

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

Chapter 5

The document presents a statistical analysis using Stata on the relationship between GDP, CPI, and imports (IMP) based on data from an Excel file. Key findings include a strong positive correlation between log_IMP and log_GDP, while log_CPI shows no significant influence from log_GDP. The analysis concludes that only imports significantly explain variations in CPI, while GDP does not.

Uploaded by

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

Question : 5.

. use "H:\sem 8\economertics\data sets\imports_uk2.xls", clear


file H:\sem 8\economertics\data sets\imports_uk2.xls not Stata format
r(610);

. import excel "H:\sem 8\economertics\data sets\imports_uk2.xls",


sheet("imports_uk2") firstrow

. summarize

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
obs | 0
CPI | 46 134.5261 18.61501 100.3 163.2
GDP | 74 87.4 11.60373 69.4 108.6
IMP | 74 40409.49 11282.9 22833 65406
PPI | 74 78.64324 17.5245 45.6 104.4

. gen log_GDP = log(GDP)

. gen log_IMP = log(IMP)

. gen log_CPI = log(CPI)


(28 missing values generated)

. regress log_GDP log_IMP log_CPI

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 2, 43) = 787.50
Model | .198587855 2 .099293928 Prob > F = 0.0000
Residual | .005421757 43 .000126087 R-squared = 0.9734
-------------+------------------------------ Adj R-squared = 0.9722
Total | .204009612 45 .004533547 Root MSE = .01123

------------------------------------------------------------------------------
log_GDP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_IMP | .4253118 .0218192 19.49 0.000 .3813092 .4693144
log_CPI | -.0068936 .0238409 -0.29 0.774 -.0549732 .0411861
_cons | .0122103 .1442798 0.08 0.933 -.2787576 .3031783
------------------------------------------------------------------------------

. correlate log_IMP log_CPI log_GDP


(obs=46)

| log_IMP log_CPI log_GDP


-------------+---------------------------
log_IMP | 1.0000
log_CPI | 0.8746 1.0000
log_GDP | 0.9866 0.8594 1.0000

. regress log_GDP log_IMP

Source | SS df MS Number of obs = 74


-------------+------------------------------ F( 1, 72) = 5376.63
Model | 1.30838112 1 1.30838112 Prob > F = 0.0000
Residual | .017520924 72 .000243346 R-squared = 0.9868
-------------+------------------------------ Adj R-squared = 0.9866
Total | 1.32590204 73 .018163042 Root MSE = .0156

------------------------------------------------------------------------------
log_GDP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_IMP | .4711678 .0064257 73.33 0.000 .4583584 .4839772
_cons | -.5174972 .0679287 -7.62 0.000 -.6529106 -.3820838
------------------------------------------------------------------------------

. regress log_IMP log_CPI

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 1, 44) = 143.20
Model | .861981266 1 .861981266 Prob > F = 0.0000
Residual | .264846461 44 .006019238 R-squared = 0.7650
-------------+------------------------------ Adj R-squared = 0.7596
Total | 1.12682773 45 .025040616 Root MSE = .07758

------------------------------------------------------------------------------
log_IMP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_CPI | .9556597 .0798592 11.97 0.000 .794714 1.116605
_cons | 6.083147 .3908238 15.56 0.000 5.295493 6.870801
------------------------------------------------------------------------------

. regress log_CPI log_GDP

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 1, 44) = 124.32
Model | .697100738 1 .697100738 Prob > F = 0.0000
Residual | .246723904 44 .005607361 R-squared = 0.7386
-------------+------------------------------ Adj R-squared = 0.7327
Total | .943824643 45 .020973881 Root MSE = .07488

------------------------------------------------------------------------------
log_CPI | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_GDP | 1.848513 .1657883 11.15 0.000 1.514388 2.182637
_cons | -3.526345 .7550835 -4.67 0.000 -5.048115 -2.004574
------------------------------------------------------------------------------

. regress log_GDP log_IMP log_CPI

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 2, 43) = 787.50
Model | .198587855 2 .099293928 Prob > F = 0.0000
Residual | .005421757 43 .000126087 R-squared = 0.9734
-------------+------------------------------ Adj R-squared = 0.9722
Total | .204009612 45 .004533547 Root MSE = .01123

------------------------------------------------------------------------------
log_GDP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_IMP | .4253118 .0218192 19.49 0.000 .3813092 .4693144
log_CPI | -.0068936 .0238409 -0.29 0.774 -.0549732 .0411861
_cons | .0122103 .1442798 0.08 0.933 -.2787576 .3031783
------------------------------------------------------------------------------
. vif

Variable | VIF 1/VIF


-------------+----------------------
log_CPI | 4.25 0.235037
log_IMP | 4.25 0.235037
-------------+----------------------
Mean VIF | 4.25

Question 5.2

. summarize

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
obs | 0
cpi | 46 134.5261 18.61501 100.3 163.2
gdp | 74 87.4 11.60373 69.4 108.6
imp | 74 40409.49 11282.9 22833 65406
ppi | 74 78.64324 17.5245 45.6 104.4

. gen log_cpi = log(cpi)


(28 missing values generated)

. gen log_gdp = log(gdp)

. gen log_imp = log(imp)

. correlate log_gdp log_cpi log_imp


(obs=46)

| log_gdp log_cpi log_imp


-------------+---------------------------
log_gdp | 1.0000
log_cpi | 0.8594 1.0000
log_imp | 0.9866 0.8746 1.0000

. regress log_cpi log_imp log_gdp

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 2, 43) = 70.15
Model | .722421206 2 .361210603 Prob > F = 0.0000
Residual | .221403437 43 .005148917 R-squared = 0.7654
-------------+------------------------------ Adj R-squared = 0.7545
Total | .943824643 45 .020973881 Root MSE = .07176

------------------------------------------------------------------------------
log_cpi | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_imp | .9186299 .4142501 2.22 0.032 .0832149 1.754045
log_gdp | -.2815064 .9735676 -0.29 0.774 -2.244893 1.68188
_cons | -3.708873 .7282251 -5.09 0.000 -5.177479 -2.240267
------------------------------------------------------------------------------

. reg log_imp log_gdp

Source | SS df MS Number of obs = 74


-------------+------------------------------ F( 1, 72) = 5376.63
Model | 5.81575286 1 5.81575286 Prob > F = 0.0000
Residual | .077880493 72 .001081674 R-squared = 0.9868
-------------+------------------------------ Adj R-squared = 0.9866
Total | 5.89363335 73 .080734703 Root MSE = .03289

------------------------------------------------------------------------------
log_imp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_gdp | 2.09434 .0285622 73.33 0.000 2.037403 2.151278
_cons | 1.22346 .1274916 9.60 0.000 .9693098 1.477609
------------------------------------------------------------------------------

. reg log_imp log_cpi

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 1, 44) = 143.20
Model | .861981266 1 .861981266 Prob > F = 0.0000
Residual | .264846461 44 .006019238 R-squared = 0.7650
-------------+------------------------------ Adj R-squared = 0.7596
Total | 1.12682773 45 .025040616 Root MSE = .07758

------------------------------------------------------------------------------
log_imp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_cpi | .9556597 .0798592 11.97 0.000 .794714 1.116605
_cons | 6.083147 .3908238 15.56 0.000 5.295493 6.870801
------------------------------------------------------------------------------

. c

Source | SS df MS Number of obs = 46


-------------+------------------------------ F( 1, 44) = 124.32
Model | .15067974 1 .15067974 Prob > F = 0.0000
Residual | .053329873 44 .001212043 R-squared = 0.7386
-------------+------------------------------ Adj R-squared = 0.7327
Total | .204009612 45 .004533547 Root MSE = .03481

------------------------------------------------------------------------------
log_gdp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
log_cpi | .3995598 .0358355 11.15 0.000 .3273381 .4717815
_cons | 2.599445 .1753756 14.82 0.000 2.245998 2.952891
------------------------------------------------------------------------------

. vif

Variable | VIF 1/VIF


-------------+----------------------
log_cpi | 1.00 1.000000
-------------+----------------------
Mean VIF | 1.00
Correlation Matrix
log_gdp & log_cpi: Correlation = 0.8594 → High correlation suggests potential
multicollinearity.

log_gdp & log_imp: 0.9866 → Strong positive relationship.

log_cpi & log_imp: 0.8746 → Also a strong positive relationship.


R² = 0.7654 → 76.5% of variation in CPI explained by IMP and GDP.

log_imp: t = 2.22, p = 0.032 → Statistically significant at 5% level.

log_gdp: t = -0.29, p = 0.774 → Not significant, suggests weak influence.

Conclusion: Only imports explain CPI here; GDP does not.

You might also like