| title: “Ankit Output” |
| author: “Bishal Shr” |
| date: “2024-11-11” |
| output: |
| html_document:t |
| toc: TRUE |
| toc_depth: 2 |
library(AER)
library(plm)
library(systemfit)
library(readr)
library(stargazer)
library(lmtest)
library(dplyr)
library(psych)
library(writexl)
library(knitr)
library(readxl)
setwd("/Users/bisshr/Desktop/Ankit Shrestha")
data <- data <- read_xlsx("dat_29_10_24.xlsx")
pdata<-pdata.frame(data, index=c("Year", "ABB"))
pdata$PIND<-as.double(pdata$PIND)
#Descriptive Statistics
## [,1]
## mean_PIND 0.11400000
## mean_RDUAL 0.58000000
## mean_BSIZE 6.74500000
## mean_ATTEN 0.07500000
## mean_AGE 24.15000000
## mean_LEV 0.89293617
## mean_SIZE 25.54899479
## mean_growth 0.30799205
## sd_PIND 0.06927369
## sd_RDUAL 0.49479705
## sd_BSIZE 1.11182543
## sd_ATTEN 0.26405230
## sd_AGE 12.69184441
## sd_LEV 0.02712963
## sd_SIZE 0.65006760
## sd_growth 1.24416573
## min_PIND 0.00000000
## min_RDUAL 0.00000000
## min_BSIZE 5.00000000
## min_ATTEN 0.00000000
## min_AGE 12.69184441
## min_LEV 0.80461985
## min_SIZE 23.15791318
## min_growth -5.61000000
## max_PIND 0.20000000
## max_RDUAL 1.00000000
## max_BSIZE 10.00000000
## max_ATTEN 1.00000000
## max_AGE 12.69184441
## max_LEV 0.98052744
## max_SIZE 26.99024352
## max_growth 11.26000000
## median_PIND 0.14300000
## median_RDUAL 1.00000000
## median_BSIZE 7.00000000
## median_ATTEN 0.00000000
## median_AGE 12.69184441
## median_LEV 0.89789564
## median_SIZE 25.56935995
## median_growth 0.16000000
ROA_pind_fixed<-plm(PIND~ROA+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="within", data=pdata)
ROA_pind_random<-plm(PIND~ROA+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="random", data=pdata)
##Table with PIND regressed on exogeneous variables (Fixed Vs Random)
stargazer(ROA_pind_fixed,ROA_pind_random, type="text", title="The Model Estimates ROA PIND", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROA PIND
## ===================================================
## Dependent variable:
## -------------------------------------
## PIND
## Fixed Effect Random Effect
## (1) (2)
## ---------------------------------------------------
## ROA 0.5964 -0.8932
## (1.0081) (0.9108)
## RDUAL -0.0071 -0.0052
## (0.0104) (0.0105)
## BSIZE -0.0078* -0.0098**
## (0.0047) (0.0044)
## AGE 0.0001 -0.0001
## (0.0005) (0.0005)
## LEV -0.5063** -0.7202***
## (0.2493) (0.2053)
## SIZE -0.0242 0.0093
## (0.0157) (0.0088)
## Profit_Growth 0.0010 0.0041
## (0.0045) (0.0043)
## Constant 0.6025**
## (0.2837)
## ---------------------------------------------------
## Observations 200 200
## R2 0.0954 0.1188
## Adjusted R2 0.0164 0.0867
## F Statistic 2.7584*** (df = 7; 183) 25.8868***
## ===================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
## Test of Ranodm Effect Model Vs Fixed Effect Model
test_ROA_pind<-phtest(ROA_pind_fixed, ROA_pind_random)
print(test_ROA_pind)
##
## Hausman Test
##
## data: PIND ~ ROA + RDUAL + BSIZE + AGE + LEV + SIZE + Profit_Growth
## chisq = 15.846, df = 7, p-value = 0.02656
## alternative hypothesis: one model is inconsistent
ROA_pind_fixed$coefficients
## ROA RDUAL BSIZE AGE LEV
## 0.5964184729 -0.0071488592 -0.0078381642 0.0001028464 -0.5062675889
## SIZE Profit_Growth
## -0.0242316504 0.0009685382
ROA_pind_random$coefficients
## (Intercept) ROA RDUAL BSIZE AGE
## 6.025365e-01 -8.932065e-01 -5.216285e-03 -9.799879e-03 -9.108042e-05
## LEV SIZE Profit_Growth
## -7.202233e-01 9.319817e-03 4.089751e-03
##p-value ≥ 0.05: Indicates that the random effects model is appropriate,
##as it suggests that individual effects are not correlated with the regressors.
##Model Used for fitting estimated PIND (ePIND) value for main regression
summary(ROA_pind_fixed)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = PIND ~ ROA + RDUAL + BSIZE + AGE + LEV + SIZE +
## Profit_Growth, data = pdata, model = "within")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.163694 -0.022604 0.018091 0.044214 0.119081
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## ROA 0.59641847 1.00811781 0.5916 0.55484
## RDUAL -0.00714886 0.01042224 -0.6859 0.49363
## BSIZE -0.00783816 0.00467957 -1.6750 0.09565 .
## AGE 0.00010285 0.00048334 0.2128 0.83173
## LEV -0.50626759 0.24932166 -2.0306 0.04374 *
## SIZE -0.02423165 0.01565513 -1.5478 0.12339
## Profit_Growth 0.00096854 0.00446450 0.2169 0.82850
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.81346
## Residual Sum of Squares: 0.73582
## R-Squared: 0.095441
## Adj. R-Squared: 0.016354
## F-statistic: 2.75836 on 7 and 183 DF, p-value: 0.0095227
ePIND<-fitted.values(ROA_pind_fixed)
ROA_lev_fixed<-plm(LEV~ROA+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="within", data=pdata)
ROA_lev_random<-plm(LEV~ROA+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="random", data=pdata)
stargazer(ROA_lev_fixed,ROA_lev_random, type="text", title="The Model Estimates ROA Leverage", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROA Leverage
## ====================================================
## Dependent variable:
## --------------------------------------
## LEV
## Fixed Effect Random Effect
## (1) (2)
## ----------------------------------------------------
## ROA -1.3181*** -1.0884***
## (0.2794) (0.2987)
## RDUAL 0.0035 0.0015
## (0.0030) (0.0035)
## BSIZE -0.0025* 0.0009
## (0.0014) (0.0015)
## AGE -0.0009*** -0.0008***
## (0.0001) (0.0001)
## PIND -0.0435** -0.0817***
## (0.0214) (0.0236)
## SIZE 0.0269*** 0.0057*
## (0.0042) (0.0031)
## Profit_Growth 0.0033** 0.0039***
## (0.0013) (0.0014)
## Constant 0.7838***
## (0.0803)
## ----------------------------------------------------
## Observations 200 200
## R2 0.4239 0.3062
## Adjusted R2 0.3736 0.2809
## F Statistic 19.2391*** (df = 7; 183) 84.7521***
## ====================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
test_ROA_elev<-phtest(ROA_lev_fixed, ROA_lev_random)
print(test_ROA_elev)
##
## Hausman Test
##
## data: LEV ~ ROA + RDUAL + BSIZE + AGE + PIND + SIZE + Profit_Growth
## chisq = 35.677, df = 7, p-value = 8.34e-06
## alternative hypothesis: one model is inconsistent
ROA_lev_fixed$coefficients
## ROA RDUAL BSIZE AGE PIND
## -1.3180917773 0.0034571786 -0.0025343357 -0.0008649281 -0.0435243546
## SIZE Profit_Growth
## 0.0268924072 0.0032659531
ROA_lev_random$coefficients
## (Intercept) ROA RDUAL BSIZE AGE
## 0.7838170483 -1.0883845600 0.0014922955 0.0009400665 -0.0007794416
## PIND SIZE Profit_Growth
## -0.0816652066 0.0056854147 0.0039030713
##p-value < 0.05: Indicates that the fixed effects model is appropriate,
##as it suggests that individual effects are not correlated with the regressors.
summary(ROA_lev_fixed)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = LEV ~ ROA + RDUAL + BSIZE + AGE + PIND + SIZE +
## Profit_Growth, data = pdata, model = "within")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.06716344 -0.01039002 0.00050676 0.01158463 0.05598307
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## ROA -1.31809178 0.27936681 -4.7181 4.712e-06 ***
## RDUAL 0.00345718 0.00304912 1.1338 0.25835
## BSIZE -0.00253434 0.00136981 -1.8501 0.06591 .
## AGE -0.00086493 0.00012650 -6.8376 1.164e-10 ***
## PIND -0.04352435 0.02143444 -2.0306 0.04374 *
## SIZE 0.02689241 0.00417061 6.4481 9.791e-10 ***
## Profit_Growth 0.00326595 0.00128674 2.5382 0.01198 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.10981
## Residual Sum of Squares: 0.063259
## R-Squared: 0.42394
## Adj. R-Squared: 0.37357
## F-statistic: 19.2391 on 7 and 183 DF, p-value: < 2.22e-16
eLEV<-fitted.values(ROA_lev_fixed)
#cleaning the data with missing values
clean_pdata<-na.omit(pdata)
reg1_ROA<-plm(ROA~RDUAL+BSIZE+MEET+ATTEN+AGE+eLEV+ePIND+SIZE+Profit_Growth, method="random", data=clean_pdata)
summary(reg1_ROA)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = ROA ~ RDUAL + BSIZE + MEET + ATTEN + AGE + eLEV +
## ePIND + SIZE + Profit_Growth, data = clean_pdata, method = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.00432757 -0.00128816 -0.00032019 0.00113041 0.00505799
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## RDUAL 2.4521e-03 3.2890e-04 7.4555 3.580e-12 ***
## BSIZE -1.1906e-03 1.9695e-04 -6.0454 8.323e-09 ***
## MEET 4.6937e-04 3.0987e-04 1.5147 0.13158
## ATTEN -1.1775e-04 5.7573e-04 -0.2045 0.83817
## AGE -5.3906e-04 2.2849e-05 -23.5921 < 2.2e-16 ***
## eLEV -5.9832e-01 2.3655e-02 -25.2936 < 2.2e-16 ***
## ePIND 2.4075e-02 1.4545e-02 1.6552 0.09962 .
## SIZE 1.8211e-02 6.7288e-04 27.0638 < 2.2e-16 ***
## Profit_Growth 2.3192e-03 1.1733e-04 19.7670 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.0061625
## Residual Sum of Squares: 0.00062863
## R-Squared: 0.89799
## Adj. R-Squared: 0.88785
## F-statistic: 177.038 on 9 and 181 DF, p-value: < 2.22e-16
reg1_ROA$coefficients
## RDUAL BSIZE MEET ATTEN AGE
## 0.0024521389 -0.0011906429 0.0004693685 -0.0001177507 -0.0005390580
## eLEV ePIND SIZE Profit_Growth
## -0.5983156797 0.0240748405 0.0182107242 0.0023191951
#Wooldridge's test for serial correlation in FE panels: Alternative hypothesis: Serial Correlation
pwartest(reg1_ROA)
##
## Wooldridge's test for serial correlation in FE panels
##
## data: reg1_ROA
## F = 1.5693, df1 = 1, df2 = 188, p-value = 0.2119
## alternative hypothesis: serial correlation
#test for heteroskedasticity
#If the p-value is small (typically < 0.05), we reject the null hypothesis.
#This suggests that heteroskedasticity is present in the model, indicating that the variance of residuals is not constant.
bptest(reg1_ROA)
##
## studentized Breusch-Pagan test
##
## data: reg1_ROA
## BP = 47.693, df = 9, p-value = 2.914e-07
#Return on Equity
ROE_pind_fixed<-plm(PIND~ROE+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="within", data=pdata)
ROE_pind_random<-plm(PIND~ROE+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="random", data=pdata)
stargazer(ROE_pind_fixed,ROE_pind_random, type="text", title="The Model Estimates ROE PIND", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROE PIND
## ==================================================
## Dependent variable:
## ------------------------------------
## PIND
## Fixed Effect Random Effect
## (1) (2)
## --------------------------------------------------
## ROE -0.0239 -0.1133*
## (0.0753) (0.0673)
## RDUAL -0.0075 -0.0071
## (0.0105) (0.0106)
## BSIZE -0.0078* -0.0099**
## (0.0047) (0.0044)
## AGE 0.0001 -0.0001
## (0.0005) (0.0005)
## LEV -0.5331** -0.5150**
## (0.2458) (0.2156)
## SIZE -0.0200 0.0106
## (0.0159) (0.0085)
## Profit_Growth 0.0029 0.0046
## (0.0042) (0.0041)
## Constant 0.3920
## (0.2748)
## --------------------------------------------------
## Observations 200 200
## R2 0.0942 0.1315
## Adjusted R2 0.0150 0.0999
## F Statistic 2.7191** (df = 7; 183) 29.0785***
## ==================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
test_ROE_pind<-phtest(ROE_pind_fixed, ROE_pind_random)
print(test_ROE_pind)
##
## Hausman Test
##
## data: PIND ~ ROE + RDUAL + BSIZE + AGE + LEV + SIZE + Profit_Growth
## chisq = 11.734, df = 7, p-value = 0.1097
## alternative hypothesis: one model is inconsistent
ROE_pind_fixed$coefficients
## ROE RDUAL BSIZE AGE LEV
## -0.023916586 -0.007507522 -0.007822982 0.000087704 -0.533103143
## SIZE Profit_Growth
## -0.020002388 0.002915821
ROE_pind_random$coefficients
## (Intercept) ROE RDUAL BSIZE AGE
## 3.920006e-01 -1.132606e-01 -7.059644e-03 -9.855932e-03 -5.786272e-05
## LEV SIZE Profit_Growth
## -5.150449e-01 1.058237e-02 4.596091e-03
##p-value ≥ 0.05: Indicates that the random effects model is appropriate,
summary(ROE_pind_random)
## Oneway (individual) effect Random Effect Model
## (Swamy-Arora's transformation)
##
## Call:
## plm(formula = PIND ~ ROE + RDUAL + BSIZE + AGE + LEV + SIZE +
## Profit_Growth, data = pdata, model = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Effects:
## var std.dev share
## idiosyncratic 4.026e-03 6.345e-02 0.978
## individual 8.976e-05 9.474e-03 0.022
## theta: 0.1684
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.154498 -0.019270 0.026278 0.043131 0.111746
##
## Coefficients:
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept) 3.9200e-01 2.7483e-01 1.4263 0.15377
## ROE -1.1326e-01 6.7257e-02 -1.6840 0.09218 .
## RDUAL -7.0596e-03 1.0552e-02 -0.6691 0.50346
## BSIZE -9.8559e-03 4.3594e-03 -2.2608 0.02377 *
## AGE -5.7863e-05 4.6379e-04 -0.1248 0.90071
## LEV -5.1504e-01 2.1564e-01 -2.3885 0.01692 *
## SIZE 1.0582e-02 8.5333e-03 1.2401 0.21493
## Profit_Growth 4.5961e-03 4.0667e-03 1.1302 0.25840
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.91133
## Residual Sum of Squares: 0.79146
## R-Squared: 0.13153
## Adj. R-Squared: 0.099867
## Chisq: 29.0785 on 7 DF, p-value: 0.00013999
ePIND_ROE<-fitted.values(ROE_pind_random)
ROE_lev_fixed<-plm(LEV~ROE+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="within", data=pdata)
ROE_lev_random<-plm(LEV~ROE+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="random", data=pdata)
stargazer(ROE_lev_fixed,ROE_lev_random, type="text", title="The Model Estimates ROE Leverage", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROE Leverage
## ====================================================
## Dependent variable:
## --------------------------------------
## LEV
## Fixed Effect Random Effect
## (1) (2)
## ----------------------------------------------------
## ROE 0.0880*** 0.1123***
## (0.0214) (0.0202)
## RDUAL 0.0048 0.0044
## (0.0031) (0.0033)
## BSIZE -0.0026* -0.0007
## (0.0014) (0.0014)
## AGE -0.0009*** -0.0008***
## (0.0001) (0.0001)
## PIND -0.0470** -0.0557**
## (0.0217) (0.0223)
## SIZE 0.0156*** 0.0070**
## (0.0046) (0.0033)
## Profit_Growth -0.0019 -0.0018
## (0.0012) (0.0013)
## Constant 0.7249***
## (0.0832)
## ----------------------------------------------------
## Observations 200 200
## R2 0.4085 0.3742
## Adjusted R2 0.3568 0.3514
## F Statistic 18.0549*** (df = 7; 183) 114.8048***
## ====================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
test_ROE_elev<-phtest(ROE_lev_fixed, ROE_lev_random)
print(test_ROE_elev)
##
## Hausman Test
##
## data: LEV ~ ROE + RDUAL + BSIZE + AGE + PIND + SIZE + Profit_Growth
## chisq = 5.7725, df = 7, p-value = 0.5666
## alternative hypothesis: one model is inconsistent
ROE_lev_fixed$coefficients
## ROE RDUAL BSIZE AGE PIND
## 0.0879614586 0.0048191314 -0.0026004928 -0.0008503861 -0.0469954829
## SIZE Profit_Growth
## 0.0156156117 -0.0018552351
ROE_lev_random$coefficients
## (Intercept) ROE RDUAL BSIZE AGE
## 0.7248782361 0.1123050742 0.0043912978 -0.0007454723 -0.0007903608
## PIND SIZE Profit_Growth
## -0.0556877617 0.0069968139 -0.0017798674
##p-value ≥ 0.05: Indicates that the random effects model is appropriate,
summary(ROE_lev_random)
## Oneway (individual) effect Random Effect Model
## (Swamy-Arora's transformation)
##
## Call:
## plm(formula = LEV ~ ROE + RDUAL + BSIZE + AGE + PIND + SIZE +
## Profit_Growth, data = pdata, model = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Effects:
## var std.dev share
## idiosyncratic 3.549e-04 1.884e-02 0.897
## individual 4.074e-05 6.382e-03 0.103
## theta: 0.4491
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.05307321 -0.01151186 0.00098786 0.01092321 0.08313901
##
## Coefficients:
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept) 0.72487824 0.08315659 8.7170 < 2.2e-16 ***
## ROE 0.11230507 0.02016659 5.5689 2.564e-08 ***
## RDUAL 0.00439130 0.00325795 1.3479 0.17770
## BSIZE -0.00074547 0.00140387 -0.5310 0.59541
## AGE -0.00079036 0.00013421 -5.8889 3.889e-09 ***
## PIND -0.05568776 0.02229600 -2.4977 0.01250 *
## SIZE 0.00699681 0.00326431 2.1434 0.03208 *
## Profit_Growth -0.00177987 0.00128048 -1.3900 0.16453
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.12094
## Residual Sum of Squares: 0.075682
## R-Squared: 0.37419
## Adj. R-Squared: 0.35138
## Chisq: 114.805 on 7 DF, p-value: < 2.22e-16
eLEV_ROE<-fitted.values(ROE_lev_random)
reg2_ROE<-plm(ROE~RDUAL+BSIZE+MEET+ATTEN+AGE+eLEV_ROE+ePIND_ROE+SIZE+Profit_Growth, method="random", data=clean_pdata)
summary(reg2_ROE)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = ROE ~ RDUAL + BSIZE + MEET + ATTEN + AGE + eLEV_ROE +
## ePIND_ROE + SIZE + Profit_Growth, data = clean_pdata, method = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.0743765 -0.0187787 0.0065606 0.0167196 0.0651597
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## RDUAL -0.0368886 0.0044471 -8.2950 2.416e-14 ***
## BSIZE -0.0056491 0.0026260 -2.1512 0.0327866 *
## MEET 0.0016004 0.0043321 0.3694 0.7122388
## ATTEN 0.0248116 0.0076837 3.2291 0.0014745 **
## AGE 0.0049421 0.0003052 16.1930 < 2.2e-16 ***
## eLEV_ROE 5.9043727 0.3258817 18.1181 < 2.2e-16 ***
## ePIND_ROE -0.8585125 0.1882673 -4.5601 9.397e-06 ***
## SIZE -0.0284434 0.0077199 -3.6844 0.0003026 ***
## Profit_Growth 0.0209966 0.0016478 12.7423 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 1.152
## Residual Sum of Squares: 0.12097
## R-Squared: 0.89499
## Adj. R-Squared: 0.88455
## F-statistic: 171.404 on 9 and 181 DF, p-value: < 2.22e-16
reg2_ROE$coefficients
## RDUAL BSIZE MEET ATTEN AGE
## -0.036888596 -0.005649120 0.001600422 0.024811617 0.004942133
## eLEV_ROE ePIND_ROE SIZE Profit_Growth
## 5.904372714 -0.858512455 -0.028443442 0.020996616
#Wooldridge's test for serial correlation in FE panels: Alternative hypothesis: Serial Correlation
pwartest(reg2_ROE)
##
## Wooldridge's test for serial correlation in FE panels
##
## data: reg2_ROE
## F = 10.516, df1 = 1, df2 = 188, p-value = 0.0014
## alternative hypothesis: serial correlation
#test for heteroskedasticity
#If the p-value is small (typically < 0.05), we reject the null hypothesis.
#This suggests that heteroskedasticity is present in the model, indicating that the variance of residuals is not constant.
bptest(reg2_ROE)
##
## studentized Breusch-Pagan test
##
## data: reg2_ROE
## BP = 42.132, df = 9, p-value = 3.109e-06
ROCED_pind_fixed<-plm(PIND~ROCED+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="within", data=pdata)
ROCED_pind_random<-plm(PIND~ROCED+RDUAL+BSIZE+AGE+LEV+SIZE+Profit_Growth, model ="random", data=pdata)
stargazer(ROCED_pind_fixed,ROCED_pind_random, type="text", title="The Model Estimates ROCED PIND", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROCED PIND
## ==================================================
## Dependent variable:
## ------------------------------------
## PIND
## Fixed Effect Random Effect
## (1) (2)
## --------------------------------------------------
## ROCED -0.0239 -0.1133*
## (0.0753) (0.0673)
## RDUAL -0.0075 -0.0071
## (0.0105) (0.0106)
## BSIZE -0.0078* -0.0099**
## (0.0047) (0.0044)
## AGE 0.0001 -0.0001
## (0.0005) (0.0005)
## LEV -0.5331** -0.5150**
## (0.2458) (0.2156)
## SIZE -0.0200 0.0106
## (0.0159) (0.0085)
## Profit_Growth 0.0029 0.0046
## (0.0042) (0.0041)
## Constant 0.3920
## (0.2748)
## --------------------------------------------------
## Observations 200 200
## R2 0.0942 0.1315
## Adjusted R2 0.0150 0.0999
## F Statistic 2.7191** (df = 7; 183) 29.0785***
## ==================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
test_ROCED_pind<-phtest(ROCED_pind_fixed, ROCED_pind_random)
print(test_ROCED_pind)
##
## Hausman Test
##
## data: PIND ~ ROCED + RDUAL + BSIZE + AGE + LEV + SIZE + Profit_Growth
## chisq = 11.734, df = 7, p-value = 0.1097
## alternative hypothesis: one model is inconsistent
ROCED_pind_fixed$coefficients
## ROCED RDUAL BSIZE AGE LEV
## -0.023916586 -0.007507522 -0.007822982 0.000087704 -0.533103143
## SIZE Profit_Growth
## -0.020002388 0.002915821
ROCED_pind_random$coefficients
## (Intercept) ROCED RDUAL BSIZE AGE
## 3.920006e-01 -1.132606e-01 -7.059644e-03 -9.855932e-03 -5.786272e-05
## LEV SIZE Profit_Growth
## -5.150449e-01 1.058237e-02 4.596091e-03
stargazer(ROCED_pind_fixed,ROCED_pind_random, type="text", title="ROCED FE RE PIND", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## ROCED FE RE PIND
## ==================================================
## Dependent variable:
## ------------------------------------
## PIND
## Fixed Effect Random Effect
## (1) (2)
## --------------------------------------------------
## ROCED -0.0239 -0.1133*
## (0.0753) (0.0673)
## RDUAL -0.0075 -0.0071
## (0.0105) (0.0106)
## BSIZE -0.0078* -0.0099**
## (0.0047) (0.0044)
## AGE 0.0001 -0.0001
## (0.0005) (0.0005)
## LEV -0.5331** -0.5150**
## (0.2458) (0.2156)
## SIZE -0.0200 0.0106
## (0.0159) (0.0085)
## Profit_Growth 0.0029 0.0046
## (0.0042) (0.0041)
## Constant 0.3920
## (0.2748)
## --------------------------------------------------
## Observations 200 200
## R2 0.0942 0.1315
## Adjusted R2 0.0150 0.0999
## F Statistic 2.7191** (df = 7; 183) 29.0785***
## ==================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
##p-value ≥ 0.05: Indicates that the random effects model is appropriate,
summary(ROCED_pind_random)
## Oneway (individual) effect Random Effect Model
## (Swamy-Arora's transformation)
##
## Call:
## plm(formula = PIND ~ ROCED + RDUAL + BSIZE + AGE + LEV + SIZE +
## Profit_Growth, data = pdata, model = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Effects:
## var std.dev share
## idiosyncratic 4.026e-03 6.345e-02 0.978
## individual 8.976e-05 9.474e-03 0.022
## theta: 0.1684
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.154498 -0.019270 0.026278 0.043131 0.111746
##
## Coefficients:
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept) 3.9200e-01 2.7483e-01 1.4263 0.15377
## ROCED -1.1326e-01 6.7257e-02 -1.6840 0.09218 .
## RDUAL -7.0596e-03 1.0552e-02 -0.6691 0.50346
## BSIZE -9.8559e-03 4.3594e-03 -2.2608 0.02377 *
## AGE -5.7863e-05 4.6379e-04 -0.1248 0.90071
## LEV -5.1504e-01 2.1564e-01 -2.3885 0.01692 *
## SIZE 1.0582e-02 8.5333e-03 1.2401 0.21493
## Profit_Growth 4.5961e-03 4.0667e-03 1.1302 0.25840
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.91133
## Residual Sum of Squares: 0.79146
## R-Squared: 0.13153
## Adj. R-Squared: 0.099867
## Chisq: 29.0785 on 7 DF, p-value: 0.00013999
ePIND_ROCED<-fitted.values(ROCED_pind_random)
ROCED_lev_fixed<-plm(LEV~ROCED+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="within", data=pdata)
ROCED_lev_random<-plm(LEV~ROCED+RDUAL+BSIZE+AGE+PIND+SIZE+Profit_Growth, model="random", data=pdata)
stargazer(ROCED_lev_fixed,ROCED_lev_random, type="text", title="The Model Estimates ROCED Lev", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## The Model Estimates ROCED Lev
## ====================================================
## Dependent variable:
## --------------------------------------
## LEV
## Fixed Effect Random Effect
## (1) (2)
## ----------------------------------------------------
## ROCED 0.0880*** 0.1123***
## (0.0214) (0.0202)
## RDUAL 0.0048 0.0044
## (0.0031) (0.0033)
## BSIZE -0.0026* -0.0007
## (0.0014) (0.0014)
## AGE -0.0009*** -0.0008***
## (0.0001) (0.0001)
## PIND -0.0470** -0.0557**
## (0.0217) (0.0223)
## SIZE 0.0156*** 0.0070**
## (0.0046) (0.0033)
## Profit_Growth -0.0019 -0.0018
## (0.0012) (0.0013)
## Constant 0.7249***
## (0.0832)
## ----------------------------------------------------
## Observations 200 200
## R2 0.4085 0.3742
## Adjusted R2 0.3568 0.3514
## F Statistic 18.0549*** (df = 7; 183) 114.8048***
## ====================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
test_ROCED_elev<-phtest(ROCED_lev_fixed, ROCED_lev_random)
print(test_ROCED_elev)
##
## Hausman Test
##
## data: LEV ~ ROCED + RDUAL + BSIZE + AGE + PIND + SIZE + Profit_Growth
## chisq = 5.7725, df = 7, p-value = 0.5666
## alternative hypothesis: one model is inconsistent
ROCED_lev_fixed$coefficients
## ROCED RDUAL BSIZE AGE PIND
## 0.0879614586 0.0048191314 -0.0026004928 -0.0008503861 -0.0469954829
## SIZE Profit_Growth
## 0.0156156117 -0.0018552351
ROCED_lev_random$coefficients
## (Intercept) ROCED RDUAL BSIZE AGE
## 0.7248782361 0.1123050742 0.0043912978 -0.0007454723 -0.0007903608
## PIND SIZE Profit_Growth
## -0.0556877617 0.0069968139 -0.0017798674
stargazer(ROCED_lev_fixed,ROCED_lev_random, type="text", title="ROCED FE RE LEV", no.space = TRUE,
digits=4, align=TRUE, column.labels = c("Fixed Effect", "Random Effect"))
##
## ROCED FE RE LEV
## ====================================================
## Dependent variable:
## --------------------------------------
## LEV
## Fixed Effect Random Effect
## (1) (2)
## ----------------------------------------------------
## ROCED 0.0880*** 0.1123***
## (0.0214) (0.0202)
## RDUAL 0.0048 0.0044
## (0.0031) (0.0033)
## BSIZE -0.0026* -0.0007
## (0.0014) (0.0014)
## AGE -0.0009*** -0.0008***
## (0.0001) (0.0001)
## PIND -0.0470** -0.0557**
## (0.0217) (0.0223)
## SIZE 0.0156*** 0.0070**
## (0.0046) (0.0033)
## Profit_Growth -0.0019 -0.0018
## (0.0012) (0.0013)
## Constant 0.7249***
## (0.0832)
## ----------------------------------------------------
## Observations 200 200
## R2 0.4085 0.3742
## Adjusted R2 0.3568 0.3514
## F Statistic 18.0549*** (df = 7; 183) 114.8048***
## ====================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
##p-value ≥ 0.05: Indicates that the random effects model is appropriate,
summary(ROCED_lev_fixed)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = LEV ~ ROCED + RDUAL + BSIZE + AGE + PIND + SIZE +
## Profit_Growth, data = pdata, model = "within")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.0528878 -0.0097808 0.0001263 0.0111664 0.0701045
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## ROCED 0.08796146 0.02139383 4.1115 5.929e-05 ***
## RDUAL 0.00481913 0.00309626 1.5564 0.1213322
## BSIZE -0.00260049 0.00138786 -1.8737 0.0625602 .
## AGE -0.00085039 0.00012898 -6.5930 4.471e-10 ***
## PIND -0.04699548 0.02167142 -2.1685 0.0314075 *
## SIZE 0.01561561 0.00461225 3.3857 0.0008689 ***
## Profit_Growth -0.00185524 0.00124139 -1.4945 0.1367717
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 0.10981
## Residual Sum of Squares: 0.064954
## R-Squared: 0.4085
## Adj. R-Squared: 0.35679
## F-statistic: 18.0549 on 7 and 183 DF, p-value: < 2.22e-16
eLEV_ROCED<-fitted.values(ROCED_lev_fixed)
reg3_ROCED<-plm(ROCED~RDUAL+BSIZE+MEET+ATTEN+AGE+eLEV_ROCED+ePIND_ROCED+SIZE+Profit_Growth, method="random", data=clean_pdata)
summary(reg3_ROCED)
## Oneway (individual) effect Within Model
##
## Call:
## plm(formula = ROCED ~ RDUAL + BSIZE + MEET + ATTEN + AGE + eLEV_ROCED +
## ePIND_ROCED + SIZE + Profit_Growth, data = clean_pdata, method = "random")
##
## Balanced Panel: n = 10, T = 20, N = 200
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -0.0798899 -0.0199797 0.0063596 0.0178617 0.0724005
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## RDUAL -0.04650992 0.00473043 -9.8321 < 2.2e-16 ***
## BSIZE 0.00740797 0.00326688 2.2676 0.024536 *
## MEET 0.00196728 0.00454522 0.4328 0.665659
## ATTEN 0.02632125 0.00805761 3.2666 0.001302 **
## AGE 0.00636623 0.00039616 16.0697 < 2.2e-16 ***
## eLEV_ROCED 7.13404551 0.42519905 16.7781 < 2.2e-16 ***
## ePIND_ROCED -0.96981571 0.19574370 -4.9545 1.657e-06 ***
## SIZE -0.09668898 0.01113587 -8.6827 2.225e-15 ***
## Profit_Growth 0.02479244 0.00167877 14.7682 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 1.152
## Residual Sum of Squares: 0.1332
## R-Squared: 0.88437
## Adj. R-Squared: 0.87287
## F-statistic: 153.819 on 9 and 181 DF, p-value: < 2.22e-16
reg3_ROCED$coefficient
## RDUAL BSIZE MEET ATTEN AGE
## -0.046509922 0.007407965 0.001967279 0.026321254 0.006366229
## eLEV_ROCED ePIND_ROCED SIZE Profit_Growth
## 7.134045513 -0.969815707 -0.096688983 0.024792444
#Wooldridge's test for serial correlation in FE panels: Alternative hypothesis: Serial Correlation
pwartest(reg3_ROCED)
##
## Wooldridge's test for serial correlation in FE panels
##
## data: reg3_ROCED
## F = 8.9983, df1 = 1, df2 = 188, p-value = 0.003068
## alternative hypothesis: serial correlation
#test for heteroskedasticity
#If the p-value is small (typically < 0.05), we reject the null hypothesis.
#This suggests that heteroskedasticity is present in the model, indicating that the variance of residuals is not constant.
bptest(reg3_ROCED)
##
## studentized Breusch-Pagan test
##
## data: reg3_ROCED
## BP = 35.675, df = 9, p-value = 4.527e-05
stargazer(reg1_ROA,reg2_ROE,reg3_ROCED, type="text", title="The Model Estimates", no.space = TRUE,
digits=4, align=TRUE)
##
## The Model Estimates
## =============================================================
## Dependent variable:
## -----------------------------------
## ROA ROE ROCED
## (1) (2) (3)
## -------------------------------------------------------------
## RDUAL 0.0025*** -0.0369*** -0.0465***
## (0.0003) (0.0044) (0.0047)
## BSIZE -0.0012*** -0.0056** 0.0074**
## (0.0002) (0.0026) (0.0033)
## MEET 0.0005 0.0016 0.0020
## (0.0003) (0.0043) (0.0045)
## ATTEN -0.0001 0.0248*** 0.0263***
## (0.0006) (0.0077) (0.0081)
## AGE -0.0005*** 0.0049*** 0.0064***
## (0.00002) (0.0003) (0.0004)
## eLEV -0.5983***
## (0.0237)
## ePIND 0.0241*
## (0.0145)
## eLEV_ROE 5.9044***
## (0.3259)
## ePIND_ROE -0.8585***
## (0.1883)
## eLEV_ROCED 7.1340***
## (0.4252)
## ePIND_ROCED -0.9698***
## (0.1957)
## SIZE 0.0182*** -0.0284*** -0.0967***
## (0.0007) (0.0077) (0.0111)
## Profit_Growth 0.0023*** 0.0210*** 0.0248***
## (0.0001) (0.0016) (0.0017)
## -------------------------------------------------------------
## Observations 200 200 200
## R2 0.8980 0.8950 0.8844
## Adjusted R2 0.8878 0.8845 0.8729
## F Statistic (df = 9; 181) 177.0375*** 171.4038*** 153.8186***
## =============================================================
## Note: *p<0.1; **p<0.05; ***p<0.01