0% found this document useful (0 votes)
29 views14 pages

Assignment No 3

Uploaded by

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

Assignment No 3

Uploaded by

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

ASSIGNMENT NO 03

Name: Urooj Shahid


Roll no: NUML-F23-42566
Department: Management Sciences
Semester: MS-2
Course title: Multivariate data analysis
Course instructor: Dr. Aksar
Panel Data
Step 1: Preparing the Data

xtset code years

Step 2: Visualizing Data

line lev years


1
.8
.6
Lev
.4
.2
0

2012 2014 2016 2018 2020 2022


Years

Scatter roa years


40
30
ROA
20 10
0

2012 2014 2016 2018 2020 2022


Years
line roa fs

40
30
ROA
20
10
0

10 15 20 25
FS

graph matrix fs years

2010 2015 2020

20

FS
15

10

2020

Years
2015

2010
10 15 20

Step 3: Descriptive Statistics


summarize roa fs growth csr lev

Variable Obs Mean Std. Dev. Min Max

roa 5,467 .1464876 .9372257 -.8435757 32.76717


fs 5,467 16.17173 1.859999 10.15697 21.97712
growth 5,467 .0132229 .7718883 -7.323035 8.925215
csr 5,467 16.01506 12.63403 0 33.0113
lev 5,467 .3036661 .2350756 .0000354 .9693936

Interpretation:

The table summarizes the statistics of five financial variables from a dataset of 5,467
observations. The average Return on Assets (ROA) is 0.146 with a high variability,
while the firm size (fs) has a mean of 16.17 and ranges significantly. The average
growth rate is low at 0.013, Corporate Social Responsibility (CSR) scores average
16.02, and leverage (lev) averages 0.304, indicating varied financial structures among
the firms.

correlate roa fs growth csr lev

roa fs growth csr lev

roa 1.0000
fs -0.1471 1.0000
growth 0.0033 0.1166 1.0000
csr 0.0100 0.0120 -0.0026 1.0000
lev -0.0326 -0.0946 -0.0144 -0.0313 1.0000

Interpretation:

The table shows the correlation coefficients between five variables: ROA, firm size
(fs), growth, CSR, and leverage (lev). ROA has a weak negative correlation with firm
size (-0.1471) and a very weak negative correlation with leverage (-0.0326). Firm size
has a weak positive correlation with growth (0.1166) and weak negative correlations
with CSR (0.0120) and leverage (-0.0946). The correlations among the other variables
are very weak, indicating minimal linear relationships.

regress roa csr lev growth fs


Source SS df MS Number of obs = 5,467
F(4, 5462) = 34.06
Model 116.851212 4 29.212803 Prob > F = 0.0000
Residual 4684.43922 5,462 .857641747 R-squared = 0.0243
Adj R-squared = 0.0236
Total 4801.29044 5,466 .878391957 Root MSE = .92609

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

csr .0007775 .000992 0.78 0.433 -.0011672 .0027222


lev -.1855804 .0535509 -3.47 0.001 -.2905615 -.0805993
growth .0250235 .0163396 1.53 0.126 -.0070085 .0570556
fs -.0775961 .0068109 -11.39 0.000 -.0909483 -.064244
_cons 1.444924 .1145289 12.62 0.000 1.220402 1.669446

Interpretation:

The regression analysis shows that while corporate social responsibility (csr) and
growth do not significantly impact return on assets (roa), leverage (lev) and firm size
(fs) have significant negative effects. The model explains only 2.43% of the
variability in roa, indicating other factors might play a more substantial role.

Step 4: Model Specification

xtreg roa csr lev growth fs, fe


Fixed-effects (within) regression Number of obs = 5,467
Group variable: code Number of groups = 497

R-sq: Obs per group:


within = 0.0040 min = 11
between = 0.0259 avg = 11.0
overall = 0.0223 max = 11

F(4,4966) = 5.02
corr(u_i, Xb) = 0.0690 Prob > F = 0.0005

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

csr -.0001425 .0005639 -0.25 0.800 -.001248 .000963


lev -.1846399 .0617157 -2.99 0.003 -.3056299 -.0636499
growth .0019293 .0069346 0.28 0.781 -.0116656 .0155242
fs -.0390905 .011292 -3.46 0.001 -.0612277 -.0169532
_cons .836974 .1850991 4.52 0.000 .4740979 1.19985

sigma_u .85728818
sigma_e .37634088
rho .83842526 (fraction of variance due to u_i)

F test that all u_i=0: F(496, 4966) = 56.67 Prob > F = 0.0000
Interpretation:

The analysis was conducted using a random effects regression model with 5,467
observations and 497 groups, and the results show that the model is significant overall
(Prob>F = 0.0000).

xtreg roa csr lev growth fs, re


Random-effects GLS regression Number of obs = 5,467
Group variable: code Number of groups = 497

R-sq: Obs per group:


within = 0.0040 min = 11
between = 0.0270 avg = 11.0
overall = 0.0233 max = 11

Wald chi2(4) = 31.45


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

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

csr -.0001337 .0005591 -0.24 0.811 -.0012294 .0009621


lev -.1841511 .058214 -3.16 0.002 -.2982485 -.0700537
growth .0030166 .0069178 0.44 0.663 -.010542 .0165753
fs -.0478288 .0099891 -4.79 0.000 -.067407 -.0282506
_cons .9779841 .1684415 5.81 0.000 .6478449 1.308123

sigma_u .84794897
sigma_e .37634088
rho .83543546 (fraction of variance due to u_i)

Interpretation:

The analysis was conducted using a random effects regression model with 5,467
observations and 497 groups, and the results show that the model is significant overall
(Prob>F = 0.0000).

Step 5: Model Diagnostics

xtreg roa csr lev growth fs, fe

estimates store fe

xtreg roa csr lev growth fs, re

estimates store re

hausman fe re
Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
fe re Difference S.E.

csr -.0001337 -.0001337 0 0


lev -.1841511 -.1841511 0 0
growth .0030166 .0030166 0 0
fs -.0478288 -.0478288 0 0

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(0) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 0.00
Prob>chi2 = .
(V_b-V_B is not positive definite)

Interpretation:

The Hausman test results show that the fixed effects (fe) and random effects (re)
models yield identical coefficient estimates for all variables (csr, lev, growth, fs),
leading to zero differences and zero standard errors. This indicates that the Hausman
test cannot be computed properly due to the rank deficiency of the differenced
variance matrix. The chi-square statistic is 0, and the test is not valid (Prob>chi2 is
not computable). Consequently, no conclusion can be drawn about whether the fixed
effects or random effects model is more appropriate based on this test.

Breusch and Pagan Lagrangian multiplier test for random effects

roa[code,t] = Xb + u[code] + e[code,t]

Estimated results:
Var sd = sqrt(Var)

roa .878392 .9372257


e .1416325 .3763409
u .7190175 .847949

Test: Var(u) = 0
chibar2(01) = 19016.66
Prob > chibar2 = 0.0000

Interpretation:
The Breusch-Pagan Lagrangian multiplier test indicates that the variance of the
random effects (Var(u)) is significantly different from zero, suggesting that a random
effects model is appropriate for the data.

Co-integration:
Time Series:
. tsset year

Time variable: year, 2000 to 2022


Delta: 1 unit

Variables generated:

. gen loi=log( chir)

. gen loinf=log( chinf)

. gen logdp=log( chgdpg)

Augmented Dfuller Unit Root Test:


. dfuller loi, lags(0)

Dickey-Fuller test for unit root Number of obs = 12

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.290 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.1754

Interpretation:

The Dickey-Fuller test statistic is -2.290, which is higher (less negative) than the 10%
critical value of -2.630, indicating that we fail to reject the null hypothesis of a unit
root. This suggests that the time series likely has a unit root and is non-stationary,
with a p-value of 0.1754.
. dfuller loi, lags(1)

Augmented Dickey-Fuller test for unit root Number of obs = 9

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.061 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.2605

Interpretation:

The Augmented Dickey-Fuller test statistic of -2.061 does not fall below the critical
values at the 1%, 5%, or 10% levels, and the p-value of 0.2605 indicates that we fail
to reject the null hypothesis of a unit root, suggesting the time series is non-stationary.

. dfuller loi, lags(2)

Augmented Dickey-Fuller test for unit root Number of obs = 7

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.615 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.4754

Interpretation:

The Augmented Dickey-Fuller test statistic is -1.615, which is not lower than the 10%
critical value of -2.630, indicating that we fail to reject the null hypothesis of a unit
root. The p-value of 0.4754 further supports this, suggesting that the time series is
non-stationary.
. dfuller loi, lags(3)

Augmented Dickey-Fuller test for unit root Number of obs = 5

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) . -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 1.0000


Interpretation:

The Augmented Dickey-Fuller test indicates that the test statistic (Z(t) = 0) is not less
than the critical values at any significance level (1%, 5%, or 10%), suggesting the
presence of a unit root. Consequently, the p-value of 1.0000 implies that we fail to
reject the null hypothesis of non-stationarity, indicating that the time series is likely
non-stationary.

. dfuller loi, lags(4)

Augmented Dickey-Fuller test for unit root Number of obs = 4

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) . -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 1.0000

Interpretation:

The Augmented Dickey-Fuller test indicates that the test statistic is not provided, but
the interpolated p-value is 1.0000, which is greater than the critical values at all
significance levels (1%, 5%, and 10%). This suggests that the null hypothesis of a unit
root cannot be rejected, implying that the time series is non-stationary.

. dfuller logdp, lags(0)

Dickey-Fuller test for unit root Number of obs = 22

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.307 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.1697

Interpretation:

The Dickey-Fuller test indicates that the time series with zero lag likely contains a
unit root, suggesting it may be non-stationary, as the test statistic (-2.307) exceeds
critical values at 1% and 5% significance levels, with a p-value (0.1697) above
common thresholds.

. dfuller logdp, lags(1)

Augmented Dickey-Fuller test for unit root Number of obs = 21

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -0.577 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.8761

Interpretation:

The Augmented Dickey-Fuller test examines whether a time series has a unit root,
indicating non-stationarity. With a test statistic of -0.577 and a p-value of 0.8761,
there's insufficient evidence to reject the null hypothesis of a unit root at conventional
significance levels, suggesting the series may be non-stationary.

. dfuller logdp, lags(2)

Augmented Dickey-Fuller test for unit root Number of obs = 20

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 0.159 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.9699

Interpretation:

This table presents the results of the Augmented Dickey-Fuller test for unit root on a
time series of 20 observations. The test statistic (Z(t)) of 0.159 suggests insufficient
evidence to reject the null hypothesis of a unit root, with a p-value of 0.9699,
indicating the series likely possesses a unit root and is non-stationary.
. dfuller logdp, lags(3)

Augmented Dickey-Fuller test for unit root Number of obs = 19

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 0.368 -3.750 -3.000 -2.630

MacKinnon approximate p-value for Z(t) = 0.9802

Interpretation:

The Dickey-Fuller test statistic (Z(t)) of 0.368 suggests insufficient evidence to reject
the null hypothesis of a unit root in the series at the 1% significance level, with a p-
value of 0.9802 indicating non-stationarity.

Check for Co-integration:


. vecrank logdp loi loinf, trend(constant)

Johansen tests for cointegration


Trend: constant Number of obs = 7
Sample: 2014 - 2020 Lags = 2

5%
maximum trace critical
rank parms LL eigenvalue statistic value
0 12 . . . 29.68
1 17 . 1.00000 . 15.41
2 20 . 1.00000 . 3.76
3 21 . 1.00000

Interpretation:

The table presents Johansen tests for co-integration with a constant trend and 2 lags
over a sample period from 2014 to 2020. It shows the maximum trace rank and
corresponding critical values at the 5% significance level, indicating the presence of
co-integration between the variables logdp, loi, and loinf in the dataset.
Basic VAR:
. varbasic chgdpg chir chinf, lags(1/2) step(8)

Vector autoregression

Sample: 2002 - 2022 Number of obs = 21


Log likelihood = -105.8442 AIC = 12.0804
FPE = 38.32915 HQIC = 12.30709
Det(Sigma_ml) = 4.791144 SBIC = 13.12492

Equation Parms RMSE R-sq chi2 P>chi2

chgdpg 7 1.83294 0.7072 50.71306 0.0000


chir 7 2.44703 0.2189 5.886682 0.4360
chinf 7 1.54761 0.4171 15.0259 0.0201

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

chgdpg
chgdpg
L1. -.0177689 .2281801 -0.08 0.938 -.4649936 .4294559
L2. 1.156731 .256799 4.50 0.000 .6534142 1.660048

chir
L1. -.2896066 .2693213 -1.08 0.282 -.8174667 .2382535
L2. .1868163 .2734707 0.68 0.495 -.3491764 .7228091

chinf
L1. -1.165477 .3945297 -2.95 0.003 -1.938741 -.3922125
L2. .0437464 .3542279 0.12 0.902 -.6505275 .7380203

_cons 1.248305 2.380421 0.52 0.600 -3.417234 5.913844

chir
chgdpg
L1. -.2662254 .3046274 -0.87 0.382 -.8632841 .3308332
L2. -.0454045 .3428345 -0.13 0.895 -.7173478 .6265388

chir
L1. .146745 .3595521 0.41 0.683 -.5579643 .8514542
L2. -.1108952 .3650917 -0.30 0.761 -.8264618 .6046715

chinf
L1. .4235144 .5267092 0.80 0.421 -.6088166 1.455845
L2. .1693926 .472905 0.36 0.720 -.7574842 1.096269

_cons 3.179868 3.177934 1.00 0.317 -3.048769 9.408504

chinf
chgdpg
L1. .5930429 .1926598 3.08 0.002 .2154366 .9706491
L2. -.3901083 .2168237 -1.80 0.072 -.8150749 .0348583

chir
L1. .3290633 .2273966 1.45 0.148 -.116626 .7747525
L2. -.2513577 .2309001 -1.09 0.276 -.7039136 .2011983

chinf
L1. .5164357 .3331141 1.55 0.121 -.136456 1.169327
L2. -.4145886 .299086 -1.39 0.166 -1.000786 .1716092

_cons .2194722 2.009866 0.11 0.913 -3.719792 4.158737


Interpretation:

This table presents the results of a vector autoregression model for three variables:
GDP growth rate (chgdpg), interest rate (chir), and inflation rate (chinf). It shows
coefficients for lagged values of each variable, indicating their impact on each other
over two time periods, along with standard errors, significance levels, and confidence
intervals.

Granger causality test:


. vargranger

Granger causality Wald tests

Equation Excluded chi2 df Prob > chi2

chgdpg chir 1.3249 2 0.516


chgdpg chinf 9.0359 2 0.011
chgdpg ALL 14.372 4 0.006

chir chgdpg 2.162 2 0.339


chir chinf .95292 2 0.621
chir ALL 4.6115 4 0.330

chinf chgdpg 10.045 2 0.007


chinf chir 2.6244 2 0.269
chinf ALL 12.337 4 0.015

Interpretation:

This table shows Wald tests for Granger causality between variables. Significant
probabilities (p < 0.05) indicate causal relationships; for instance, "chgdpg" causes
"chinf" and "ALL" suggests a comprehensive causality model involving all variables.

You might also like