Loading Library

library(readxl)
library(openxlsx)
library(writexl)
library(dplyr)
library(plm)
library(psych)
library(Hmisc)

Loading data

MD_A_20_Comp_Sample <- read_excel("C:/Users/Admin/Documents/Master/NTUST/Master 1st Year/Seminar of Theory of strategy/myopia/MD&A_20 Comp_Sample.xlsx", 
                                  sheet = "Sheet1")
View(MD_A_20_Comp_Sample)
dataset <- MD_A_20_Comp_Sample
dataset$IBR <- (dataset$Debt_shortterm + dataset$Debt_longterm1 + dataset$Debt_longterm2)/dataset$TotalAssets #interested-bear ratio
dataset$tangibility <- 1- (dataset$TotalAssets-dataset$IntangibleAsset-dataset$TotalLiability)/dataset$TotalAssets
dataset$duality <- ifelse(dataset$CEO == "同一人", 1,
                          ifelse(dataset$CEO == "不同一人", 0, NA))
variables <- c("Symbol","year","myopia","CSR","ReportAttention","CSR_commitment","IBR","Leverage","Cash","ROA",
               "Growth","tangibility","SOE","Size","CompanySize","CENT","INSD","duality","Gage","Gtenue")

#Official dataset
main_df <- dataset[ , variables]
main_df <- main_df %>% arrange(Symbol, year)

# save official dataset
file_path <- "C:/Users/Admin/Documents/Master/NTUST/Master 1st Year/Seminar of Theory of strategy/myopia/MD&A_20 Comp_Sample.xlsx"
wb <- loadWorkbook(file_path)
sheet_name <- "Main_Dataset"
if (sheet_name %in% names(wb)) {
  removeWorksheet(wb, sheet_name)
}
addWorksheet(wb, sheet_name)
writeData(wb, sheet = sheet_name, x = main_df)
saveWorkbook(wb, file = file_path, overwrite = TRUE)

1.Descriptive statistic:

# Select numeric columns only (exclude Symbol and year)
vars <- main_df %>%
  select(- Symbol, -year)

# Convert to data.frame for export
desc_mat <- psych::describe(vars, fast=TRUE)

# Convert to data.frame
desc_stats_df <- as.data.frame(desc_mat)
desc_stats_df <- cbind(Variable = rownames(desc_stats_df), desc_stats_df)
rownames(desc_stats_df) <- NULL

# Name of the descriptive stats sheet
desc_sheet <- "Descriptive_Stats"

# Delete sheet if exists
if(desc_sheet %in% names(wb)) removeWorksheet(wb, desc_sheet)

# Add new sheet
addWorksheet(wb, desc_sheet)

# Write descriptive stats to sheet
writeData(wb, sheet = desc_sheet, x = desc_stats_df)
saveWorkbook(wb, file = file_path, overwrite = TRUE)
View(desc_stats_df)

2. Pearson’s correlation

cor_res <- rcorr(as.matrix(vars), type = "pearson")
r_mat <- cor_res$r
p_mat <- cor_res$P
# Function to assign stars
get_stars <- function(p) {
  if(is.na(p)) return("")
  else if(p < 0.001) return("***")
  else if(p < 0.01) return("**")
  else if(p < 0.05) return("*")
  else return("")
}
# Create table with r + stars
cor_star <- matrix(nrow = nrow(r_mat), ncol = ncol(r_mat))
rownames(cor_star) <- rownames(r_mat)
colnames(cor_star) <- colnames(r_mat)
for(i in 1:nrow(r_mat)) {
  for(j in 1:ncol(r_mat)) {
    cor_star[i,j] <- paste0(round(r_mat[i,j], 3), get_stars(p_mat[i,j]))
  }
}
# View the table
cor_star
##                 myopia     CSR         ReportAttention CSR_commitment
## myopia          "1"        "0.364***"  "-0.113"        "-0.221*"     
## CSR             "0.364***" "1"         "0.14"          "-0.329***"   
## ReportAttention "-0.113"   "0.14"      "1"             "0.062"       
## CSR_commitment  "-0.221*"  "-0.329***" "0.062"         "1"           
## IBR             "0.04"     "-0.011"    "-0.019"        "-0.187"      
## Leverage        "0.195*"   "0.215*"    "0.172"         "-0.097"      
## Cash            "0.101"    "-0.089"    "-0.294*"       "-0.199*"     
## ROA             "-0.024"   "0.475***"  "0.357**"       "-0.147"      
## Growth          "-0.228*"  "0.026"     "0.058"         "-0.225*"     
## tangibility     "0.201*"   "0.214*"    "0.178"         "-0.134"      
## SOE             "-0.083"   "0.151"     "0.046"         "0.162"       
## Size            "0.227*"   "0.448***"  "-0.034"        "0.022"       
## CompanySize     "0.403***" "0.278**"   "-0.133"        "0.09"        
## CENT            "0.266**"  "0.275**"   "0.046"         "-0.023"      
## INSD            "-0.039"   "0.003"     "0.433**"       "-0.05"       
## duality         "-0.186*"  "-0.121"    "-0.016"        "-0.037"      
## Gage            "0.332***" "0.254**"   "0.073"         "0.036"       
## Gtenue          "-0.015"   "0.033"     "0.162"         "0.101"       
##                 IBR         Leverage   Cash       ROA        Growth   
## myopia          "0.04"      "0.195*"   "0.101"    "-0.024"   "-0.228*"
## CSR             "-0.011"    "0.215*"   "-0.089"   "0.475***" "0.026"  
## ReportAttention "-0.019"    "0.172"    "-0.294*"  "0.357**"  "0.058"  
## CSR_commitment  "-0.187"    "-0.097"   "-0.199*"  "-0.147"   "-0.225*"
## IBR             "1"         "-0.44***" "0.098"    "0.051"    "-0.108" 
## Leverage        "-0.44***"  "1"        "-0.145"   "-0.12"    "-0.06"  
## Cash            "0.098"     "-0.145"   "1"        "0.206*"   "-0.024" 
## ROA             "0.051"     "-0.12"    "0.206*"   "1"        "0.186*" 
## Growth          "-0.108"    "-0.06"    "-0.024"   "0.186*"   "1"      
## tangibility     "-0.369***" "0.986***" "-0.097"   "-0.112"   "-0.065" 
## SOE             "-0.02"     "-0.172"   "-0.083"   "0.202*"   "-0.066" 
## Size            "-0.218*"   "0.455***" "-0.302**" "0.076"    "0.048"  
## CompanySize     "-0.207*"   "0.371***" "-0.147"   "-0.033"   "-0.116" 
## CENT            "-0.219*"   "0.172"    "0.082"    "0.118"    "0.09"   
## INSD            "-0.095"    "0.127"    "-0.022"   "0.101"    "0.262**"
## duality         "-0.036"    "0.107"    "0.227*"   "-0.104"   "0.076"  
## Gage            "0.013"     "-0.032"   "-0.157"   "0.089"    "-0.016" 
## Gtenue          "0.167"     "-0.042"   "-0.084"   "0.129"    "0.01"   
##                 tangibility SOE        Size       CompanySize CENT      
## myopia          "0.201*"    "-0.083"   "0.227*"   "0.403***"  "0.266**" 
## CSR             "0.214*"    "0.151"    "0.448***" "0.278**"   "0.275**" 
## ReportAttention "0.178"     "0.046"    "-0.034"   "-0.133"    "0.046"   
## CSR_commitment  "-0.134"    "0.162"    "0.022"    "0.09"      "-0.023"  
## IBR             "-0.369***" "-0.02"    "-0.218*"  "-0.207*"   "-0.219*" 
## Leverage        "0.986***"  "-0.172"   "0.455***" "0.371***"  "0.172"   
## Cash            "-0.097"    "-0.083"   "-0.302**" "-0.147"    "0.082"   
## ROA             "-0.112"    "0.202*"   "0.076"    "-0.033"    "0.118"   
## Growth          "-0.065"    "-0.066"   "0.048"    "-0.116"    "0.09"    
## tangibility     "1"         "-0.164"   "0.426***" "0.355***"  "0.161"   
## SOE             "-0.164"    "1"        "0.153"    "-0.161"    "0.117"   
## Size            "0.426***"  "0.153"    "1"        "0.639***"  "0.442***"
## CompanySize     "0.355***"  "-0.161"   "0.639***" "1"         "0.491***"
## CENT            "0.161"     "0.117"    "0.442***" "0.491***"  "1"       
## INSD            "0.121"     "-0.167"   "0.026"    "-0.06"     "0.025"   
## duality         "0.114"     "-0.273**" "-0.096"   "-0.085"    "-0.108"  
## Gage            "-0.043"    "0.048"    "0.298**"  "0.349***"  "0.195*"  
## Gtenue          "-0.027"    "0.118"    "-0.121"   "-0.127"    "0.076"   
##                 INSD      duality     Gage        Gtenue     
## myopia          "-0.039"  "-0.186*"   "0.332***"  "-0.015"   
## CSR             "0.003"   "-0.121"    "0.254**"   "0.033"    
## ReportAttention "0.433**" "-0.016"    "0.073"     "0.162"    
## CSR_commitment  "-0.05"   "-0.037"    "0.036"     "0.101"    
## IBR             "-0.095"  "-0.036"    "0.013"     "0.167"    
## Leverage        "0.127"   "0.107"     "-0.032"    "-0.042"   
## Cash            "-0.022"  "0.227*"    "-0.157"    "-0.084"   
## ROA             "0.101"   "-0.104"    "0.089"     "0.129"    
## Growth          "0.262**" "0.076"     "-0.016"    "0.01"     
## tangibility     "0.121"   "0.114"     "-0.043"    "-0.027"   
## SOE             "-0.167"  "-0.273**"  "0.048"     "0.118"    
## Size            "0.026"   "-0.096"    "0.298**"   "-0.121"   
## CompanySize     "-0.06"   "-0.085"    "0.349***"  "-0.127"   
## CENT            "0.025"   "-0.108"    "0.195*"    "0.076"    
## INSD            "1"       "0.159"     "-0.127"    "-0.121"   
## duality         "0.159"   "1"         "-0.415***" "-0.329***"
## Gage            "-0.127"  "-0.415***" "1"         "0.538***" 
## Gtenue          "-0.121"  "-0.329***" "0.538***"  "1"
# Name of the new sheet
sheet_name <- "Correlation_Table"
# Delete the sheet if it already exists
if(sheet_name %in% names(wb)) {
  removeWorksheet(wb, sheet_name)
}
# Add a new sheet
addWorksheet(wb, sheet_name)
# Export cor_star table (convert to data.frame to keep rownames as a column if needed)
writeData(wb, sheet = sheet_name, x = as.data.frame(cor_star), rowNames = TRUE)
# Save workbook
saveWorkbook(wb, file = file_path, overwrite = TRUE)

panel_df <- main_df  
pdata <- pdata.frame(panel_df, index = c("Symbol", "year"))

3. H1 Report Attention -> myopia

model1_pool <- plm(myopia ~ ReportAttention + Leverage + Cash + ROA + tangibility + Growth + SOE +
                     Size  + INSD + duality + Gage + Gtenue, data = pdata, model = "pooling")
summary(model1_pool)
## Pooling Model
## 
## Call:
## plm(formula = myopia ~ ReportAttention + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "pooling")
## 
## Unbalanced Panel: n = 14, T = 1-6, N = 48
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -0.111755 -0.058007 -0.021736  0.034866  0.230518 
## 
## Coefficients:
##                    Estimate  Std. Error t-value Pr(>|t|)   
## (Intercept)     -0.89950742  0.46111498 -1.9507 0.059133 . 
## ReportAttention -0.00094301  0.00149919 -0.6290 0.533423   
## Leverage        -1.72453835  0.82835874 -2.0819 0.044731 * 
## Cash             0.28320809  0.14798236  1.9138 0.063852 . 
## ROA             -0.19437085  0.65029800 -0.2989 0.766788   
## tangibility      1.81956760  0.86180394  2.1113 0.041955 * 
## Growth          -0.02374195  0.01774757 -1.3378 0.189603   
## SOE             -0.04184616  0.03263421 -1.2823 0.208173   
## Size             0.02063531  0.02160679  0.9550 0.346109   
## INSD             0.25042905  0.22644392  1.1059 0.276305   
## duality         -0.03111241  0.03638574 -0.8551 0.398327   
## Gage             0.00885679  0.00263906  3.3560 0.001915 **
## Gtenue          -0.00032673  0.00041255 -0.7920 0.433714   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.65646
## Residual Sum of Squares: 0.28791
## R-Squared:      0.56142
## Adj. R-Squared: 0.41105
## F-statistic: 3.73356 on 12 and 35 DF, p-value: 0.0011306
# fixed effect
model1_fe <- plm(myopia ~ ReportAttention + Leverage + Cash + ROA + tangibility + Growth + SOE +
                   Size  + INSD + duality + Gage + Gtenue, data = pdata, model = "within")
summary(model1_fe)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = myopia ~ ReportAttention + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "within")
## 
## Unbalanced Panel: n = 14, T = 1-6, N = 48
## 
## Residuals:
##        Min.     1st Qu.      Median     3rd Qu.        Max. 
## -1.0598e-01 -2.1888e-02 -4.3910e-16  2.0994e-02  1.7862e-01 
## 
## Coefficients:
##                    Estimate  Std. Error t-value Pr(>|t|)  
## ReportAttention -0.00027436  0.00137492 -0.1995  0.84367  
## Leverage         2.27830700  4.34488762  0.5244  0.60527  
## Cash             0.12393506  0.25682252  0.4826  0.63417  
## ROA              0.35511004  1.20269539  0.2953  0.77056  
## tangibility     -2.44726468  4.34882400 -0.5627  0.57930  
## Growth          -0.01300853  0.02163925 -0.6012  0.55388  
## SOE             -0.07603299  0.07810914 -0.9734  0.34093  
## Size             0.02210864  0.03279829  0.6741  0.50728  
## INSD            -0.35182070  0.46256040 -0.7606  0.45497  
## duality         -0.05424987  0.04682231 -1.1586  0.25903  
## Gage             0.00835610  0.00335372  2.4916  0.02074 *
## Gtenue          -0.00103210  0.00062138 -1.6610  0.11090  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.16854
## Residual Sum of Squares: 0.1152
## R-Squared:      0.31646
## Adj. R-Squared: -0.46029
## F-statistic: 0.848786 on 12 and 22 DF, p-value: 0.6046
# random effect
model1_re <- plm(myopia ~ ReportAttention + Leverage + Cash + ROA + tangibility + Growth + SOE +
                   Size  + INSD + duality  + Gage + Gtenue, data = pdata, model = "random")
summary(model1_re)
## Oneway (individual) effect Random Effect Model 
##    (Swamy-Arora's transformation)
## 
## Call:
## plm(formula = myopia ~ ReportAttention + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "random")
## 
## Unbalanced Panel: n = 14, T = 1-6, N = 48
## 
## Effects:
##                    var  std.dev share
## idiosyncratic 0.005237 0.072364     1
## individual    0.000000 0.000000     0
## theta:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       0       0       0       0       0       0 
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -0.111755 -0.058007 -0.021736  0.034866  0.230518 
## 
## Coefficients:
##                    Estimate  Std. Error z-value  Pr(>|z|)    
## (Intercept)     -0.89950742  0.46111498 -1.9507 0.0510901 .  
## ReportAttention -0.00094301  0.00149919 -0.6290 0.5293385    
## Leverage        -1.72453835  0.82835874 -2.0819 0.0373540 *  
## Cash             0.28320809  0.14798236  1.9138 0.0556462 .  
## ROA             -0.19437085  0.65029800 -0.2989 0.7650201    
## tangibility      1.81956760  0.86180394  2.1113 0.0347425 *  
## Growth          -0.02374195  0.01774757 -1.3378 0.1809754    
## SOE             -0.04184616  0.03263421 -1.2823 0.1997448    
## Size             0.02063531  0.02160679  0.9550 0.3395584    
## INSD             0.25042905  0.22644392  1.1059 0.2687608    
## duality         -0.03111241  0.03638574 -0.8551 0.3925116    
## Gage             0.00885679  0.00263906  3.3560 0.0007907 ***
## Gtenue          -0.00032673  0.00041255 -0.7920 0.4283793    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.65646
## Residual Sum of Squares: 0.28791
## R-Squared:      0.56142
## Adj. R-Squared: 0.41105
## Chisq: 44.8027 on 12 DF, p-value: 1.1139e-05
hausman_test <- phtest(model1_fe, model1_re)
hausman_test
## 
##  Hausman Test
## 
## data:  myopia ~ ReportAttention + Leverage + Cash + ROA + tangibility +  ...
## chisq = 17.594, df = 12, p-value = 0.1286
## alternative hypothesis: one model is inconsistent

4. H2: CSR -> myopia

model2_pool <- plm(myopia ~ CSR_commitment + Leverage + Cash + ROA + tangibility + Growth + SOE +
                     Size + CENT + INSD + duality + Gage + Gtenue, data = pdata, model = "pooling")
summary(model2_pool)
## Pooling Model
## 
## Call:
## plm(formula = myopia ~ CSR_commitment + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + CENT + INSD + duality + 
##     Gage + Gtenue, data = pdata, model = "pooling")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 105
## 
## Residuals:
##       Min.    1st Qu.     Median    3rd Qu.       Max. 
## -0.1818130 -0.0672595 -0.0079345  0.0482146  0.2935588 
## 
## Coefficients:
##                   Estimate  Std. Error t-value Pr(>|t|)   
## (Intercept)    -0.14444489  0.17863765 -0.8086 0.420859   
## CSR_commitment -0.05281189  0.02616744 -2.0182 0.046512 * 
## Leverage        0.02628810  0.26907336  0.0977 0.922386   
## Cash            0.10237257  0.08739408  1.1714 0.244500   
## ROA            -0.07113317  0.16468659 -0.4319 0.666814   
## tangibility     0.05041291  0.27786119  0.1814 0.856432   
## Growth         -0.03754560  0.01270063 -2.9562 0.003966 **
## SOE            -0.01891466  0.02270299 -0.8331 0.406950   
## Size           -0.00188945  0.00953118 -0.1982 0.843301   
## CENT            0.00136236  0.00072345  1.8832 0.062874 . 
## INSD            0.08142688  0.18285770  0.4453 0.657159   
## duality        -0.03862270  0.02607947 -1.4810 0.142071   
## Gage            0.00581746  0.00174780  3.3285 0.001262 **
## Gtenue         -0.00054147  0.00024984 -2.1673 0.032824 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    1.3225
## Residual Sum of Squares: 0.8853
## R-Squared:      0.33056
## Adj. R-Squared: 0.23493
## F-statistic: 3.45656 on 13 and 91 DF, p-value: 0.00022944
# fixed effect
model2_fe <- plm(myopia ~ CSR_commitment + Leverage + Cash + ROA + tangibility + Growth + SOE +
                         Size + CENT + INSD + duality + Gage + Gtenue, data = pdata, model = "within")
summary(model2_fe)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = myopia ~ CSR_commitment + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + CENT + INSD + duality + 
##     Gage + Gtenue, data = pdata, model = "within")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 105
## 
## Residuals:
##       Min.    1st Qu.     Median    3rd Qu.       Max. 
## -0.1381367 -0.0383372 -0.0030421  0.0276102  0.1975761 
## 
## Coefficients:
##                   Estimate  Std. Error t-value Pr(>|t|)   
## CSR_commitment -0.02206088  0.02747272 -0.8030 0.424612   
## Leverage        0.07760668  0.62909783  0.1234 0.902164   
## Cash            0.07943007  0.09837532  0.8074 0.422085   
## ROA            -0.37747682  0.17487428 -2.1586 0.034219 * 
## tangibility    -0.13025846  0.61262619 -0.2126 0.832222   
## Growth         -0.00651036  0.01099512 -0.5921 0.555630   
## SOE            -0.04294644  0.06678594 -0.6430 0.522237   
## Size            0.01190411  0.01930877  0.6165 0.539500   
## CENT           -0.00054472  0.00152456 -0.3573 0.721916   
## INSD           -0.10104559  0.22702058 -0.4451 0.657587   
## duality        -0.01372508  0.02941916 -0.4665 0.642241   
## Gage            0.00619263  0.00196596  3.1499 0.002379 **
## Gtenue         -0.00043379  0.00033885 -1.2802 0.204584   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.53113
## Residual Sum of Squares: 0.40109
## R-Squared:      0.24484
## Adj. R-Squared: -0.090791
## F-statistic: 1.79567 on 13 and 72 DF, p-value: 0.060144
# random effect
model2_re <- plm(myopia ~ CSR_commitment + Leverage + Cash + ROA + tangibility +Growth + SOE +
                  Size + CENT + INSD + duality  + Gtenue, data = pdata, model = "random")
summary(model2_re)
## Oneway (individual) effect Random Effect Model 
##    (Swamy-Arora's transformation)
## 
## Call:
## plm(formula = myopia ~ CSR_commitment + Leverage + Cash + ROA + 
##     tangibility + Growth + SOE + Size + CENT + INSD + duality + 
##     Gtenue, data = pdata, model = "random")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 105
## 
## Effects:
##                    var  std.dev share
## idiosyncratic 0.006252 0.079067 0.591
## individual    0.004332 0.065821 0.409
## theta:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.2315  0.5268  0.5597  0.5412  0.5597  0.5597 
## 
## Residuals:
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## -0.13683 -0.05412 -0.01718 -0.00124  0.03540  0.25388 
## 
## Coefficients:
##                   Estimate  Std. Error z-value Pr(>|z|)  
## (Intercept)    -0.29430763  0.25765354 -1.1423  0.25335  
## CSR_commitment -0.04270466  0.02525137 -1.6912  0.09080 .
## Leverage        0.22977977  0.40010221  0.5743  0.56576  
## Cash            0.10115167  0.09100978  1.1114  0.26638  
## ROA            -0.26755869  0.16616885 -1.6102  0.10736  
## tangibility    -0.27359562  0.40068917 -0.6828  0.49473  
## Growth         -0.02054000  0.01144821 -1.7942  0.07279 .
## SOE            -0.01413229  0.03391908 -0.4166  0.67694  
## Size            0.02142226  0.01232844  1.7376  0.08228 .
## CENT            0.00013957  0.00097915  0.1425  0.88665  
## INSD           -0.01853606  0.20969194 -0.0884  0.92956  
## duality        -0.03284956  0.02747562 -1.1956  0.23186  
## Gtenue          0.00015824  0.00024660  0.6417  0.52108  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.73912
## Residual Sum of Squares: 0.62514
## R-Squared:      0.15517
## Adj. R-Squared: 0.044978
## Chisq: 13.6075 on 12 DF, p-value: 0.32647
hausman_test <- phtest(model2_fe, model2_re)
hausman_test
## 
##  Hausman Test
## 
## data:  myopia ~ CSR_commitment + Leverage + Cash + ROA + tangibility +  ...
## chisq = 0.62237, df = 12, p-value = 1
## alternative hypothesis: one model is inconsistent

5. H3: IBR -> myopia

model3_pool <- plm(myopia ~ IBR + Leverage + Cash + ROA + tangibility + Growth + SOE +
                     Size + CENT + INSD + duality + Gage + Gtenue, data = pdata, model = "pooling")
summary(model3_pool)
## Pooling Model
## 
## Call:
## plm(formula = myopia ~ IBR + Leverage + Cash + ROA + tangibility + 
##     Growth + SOE + Size + CENT + INSD + duality + Gage + Gtenue, 
##     data = pdata, model = "pooling")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 100
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -0.196161 -0.060726 -0.017185  0.041308  0.293227 
## 
## Coefficients:
##                Estimate  Std. Error t-value  Pr(>|t|)    
## (Intercept) -0.09977436  0.19806867 -0.5037 0.6157347    
## IBR          2.26640269  0.95545343  2.3721 0.0199202 *  
## Leverage     0.35974549  0.32083873  1.1213 0.2652959    
## Cash         0.10785368  0.09061189  1.1903 0.2372110    
## ROA         -0.03636839  0.16791260 -0.2166 0.8290399    
## tangibility -0.19344272  0.31278723 -0.6184 0.5379145    
## Growth      -0.02551824  0.01282676 -1.9895 0.0498291 *  
## SOE         -0.01437910  0.02342293 -0.6139 0.5409086    
## Size        -0.01165003  0.01157243 -1.0067 0.3169004    
## CENT         0.00159847  0.00073855  2.1643 0.0332098 *  
## INSD         0.05484121  0.18516395  0.2962 0.7678093    
## duality     -0.03939659  0.02932886 -1.3433 0.1827184    
## Gage         0.00694915  0.00194812  3.5671 0.0005928 ***
## Gtenue      -0.00080573  0.00026967 -2.9878 0.0036615 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    1.3042
## Residual Sum of Squares: 0.85019
## R-Squared:      0.34813
## Adj. R-Squared: 0.24959
## F-statistic: 3.53292 on 13 and 86 DF, p-value: 0.00019719
# fixed effect
model3_fe <- plm(myopia ~ IBR + Leverage + Cash + ROA + tangibility + Growth + SOE +
                  Size + CENT + INSD + duality + Gage + Gtenue, data = pdata, model = "within")
summary(model3_fe)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = myopia ~ IBR + Leverage + Cash + ROA + tangibility + 
##     Growth + SOE + Size + CENT + INSD + duality + Gage + Gtenue, 
##     data = pdata, model = "within")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 100
## 
## Residuals:
##        Min.     1st Qu.      Median     3rd Qu.        Max. 
## -0.14098894 -0.03563931 -0.00023997  0.02438921  0.18644190 
## 
## Coefficients:
##                Estimate  Std. Error t-value  Pr(>|t|)    
## IBR          1.45241726  2.45642230  0.5913 0.5563269    
## Leverage     0.80804700  0.93058514  0.8683 0.3883181    
## Cash         0.08605706  0.10210797  0.8428 0.4023365    
## ROA         -0.49883848  0.18920779 -2.6365 0.0104019 *  
## tangibility -0.91820335  0.93608701 -0.9809 0.3301732    
## Growth      -0.00476173  0.01078444 -0.4415 0.6602458    
## SOE         -0.06388406  0.07001801 -0.9124 0.3648324    
## Size         0.02743688  0.02280252  1.2032 0.2331184    
## CENT        -0.00187631  0.00188469 -0.9956 0.3230490    
## INSD        -0.16034159  0.24134418 -0.6644 0.5087343    
## duality     -0.01941803  0.02998440 -0.6476 0.5194538    
## Gage         0.00722700  0.00190292  3.7978 0.0003169 ***
## Gtenue      -0.00065294  0.00037348 -1.7483 0.0849942 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    0.51123
## Residual Sum of Squares: 0.36338
## R-Squared:      0.2892
## Adj. R-Squared: -0.050289
## F-statistic: 2.09691 on 13 and 67 DF, p-value: 0.025552
# random effect
model3_re <- plm(myopia ~ IBR + Leverage + Cash + ROA + tangibility + Growth + SOE +
                  Size + CENT + INSD + duality  + Gtenue, data = pdata, model = "random")
summary(model3_re)
## Oneway (individual) effect Random Effect Model 
##    (Swamy-Arora's transformation)
## 
## Call:
## plm(formula = myopia ~ IBR + Leverage + Cash + ROA + tangibility + 
##     Growth + SOE + Size + CENT + INSD + duality + Gtenue, data = pdata, 
##     model = "random")
## 
## Unbalanced Panel: n = 20, T = 1-6, N = 100
## 
## Effects:
##                    var  std.dev share
## idiosyncratic 0.006494 0.080587 0.496
## individual    0.006592 0.081189 0.504
## theta:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.2955  0.5943  0.6244  0.6011  0.6244  0.6244 
## 
## Residuals:
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## -0.13825 -0.05423 -0.01910 -0.00165  0.03700  0.24942 
## 
## Coefficients:
##                Estimate  Std. Error z-value Pr(>|z|)
## (Intercept) -3.3363e-01  2.9514e-01 -1.1304   0.2583
## IBR          2.9959e-01  1.4035e+00  0.2135   0.8310
## Leverage     1.6128e-01  5.1250e-01  0.3147   0.7530
## Cash         1.1293e-01  9.7301e-02  1.1606   0.2458
## ROA         -2.7200e-01  1.7593e-01 -1.5461   0.1221
## tangibility -1.9497e-01  5.0748e-01 -0.3842   0.7008
## Growth      -1.3059e-02  1.1207e-02 -1.1652   0.2439
## SOE         -2.1844e-02  3.8472e-02 -0.5678   0.5702
## Size         2.1511e-02  1.3767e-02  1.5625   0.1182
## CENT        -1.2885e-05  1.0866e-03 -0.0119   0.9905
## INSD        -2.7825e-02  2.1760e-01 -0.1279   0.8983
## duality     -4.2082e-02  2.9218e-02 -1.4403   0.1498
## Gtenue       1.1741e-04  2.7268e-04  0.4306   0.6668
## 
## Total Sum of Squares:    0.66954
## Residual Sum of Squares: 0.58243
## R-Squared:      0.13192
## Adj. R-Squared: 0.01218
## Chisq: 10.2867 on 12 DF, p-value: 0.59083
hausman_test <- phtest(model3_fe, model3_re)
hausman_test
## 
##  Hausman Test
## 
## data:  myopia ~ IBR + Leverage + Cash + ROA + tangibility + Growth +  ...
## chisq = 12.936, df = 12, p-value = 0.3737
## alternative hypothesis: one model is inconsistent

6. H4: myopia -> CSR performance

pdata$myopia_lag1 <- lag(pdata$myopia, 1)
model4_pool <- plm(CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + tangibility + SOE +
                     Size + CENT + INSD + duality + Gage + Gtenue, data = pdata, model = "pooling")
summary(model4_pool)
## Pooling Model
## 
## Call:
## plm(formula = CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + 
##     tangibility + SOE + Size + CENT + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "pooling")
## 
## Unbalanced Panel: n = 18, T = 3-5, N = 82
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -28.2977  -5.6522  -1.0934   5.0671  43.6161 
## 
## Coefficients:
##               Estimate Std. Error t-value  Pr(>|t|)    
## (Intercept) -22.573007  23.556065 -0.9583   0.34132    
## myopia_lag1  18.353147  12.856846  1.4275   0.15801    
## Leverage    -20.842114  37.071246 -0.5622   0.57582    
## Cash        -26.851115  12.812628 -2.0957   0.03984 *  
## ROA         118.809382  23.186442  5.1241 2.664e-06 ***
## Growth       -0.823305   1.539702 -0.5347   0.59459    
## tangibility  31.698788  38.744894  0.8181   0.41613    
## SOE          -4.134401   3.154951 -1.3104   0.19445    
## Size          1.027797   1.279896  0.8030   0.42475    
## CENT          0.229097   0.104139  2.1999   0.03121 *  
## INSD        -21.172679  22.492633 -0.9413   0.34987    
## duality       0.077841   3.570635  0.0218   0.98267    
## Gage          0.233237   0.250334  0.9317   0.35478    
## Gtenue       -0.046256   0.039448 -1.1726   0.24506    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    18470
## Residual Sum of Squares: 9590.3
## R-Squared:      0.48075
## Adj. R-Squared: 0.38148
## F-statistic: 4.84295 on 13 and 68 DF, p-value: 6.7708e-06
# fixed effect
model4_fe <- plm(CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + tangibility + SOE +
                   Size + CENT + INSD + duality  + Gage + Gtenue, data = pdata, model = "within")
summary(model4_fe)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + 
##     tangibility + SOE + Size + CENT + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "within")
## 
## Unbalanced Panel: n = 18, T = 3-5, N = 82
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -23.70599  -3.61773  -0.19331   3.92157  32.23157 
## 
## Coefficients:
##               Estimate Std. Error t-value  Pr(>|t|)    
## myopia_lag1 -33.479613  17.463446 -1.9171 0.0608321 .  
## Leverage    100.841975 133.586637  0.7549 0.4537925    
## Cash        -18.106083  17.175371 -1.0542 0.2967653    
## ROA         119.341633  28.447334  4.1952 0.0001089 ***
## Growth       -0.584525   1.733214 -0.3372 0.7373132    
## tangibility -79.512402 133.427165 -0.5959 0.5538620    
## SOE           5.039531  14.473745  0.3482 0.7291349    
## Size         -7.242747   4.710340 -1.5376 0.1303215    
## CENT          0.134536   0.327741  0.4105 0.6831614    
## INSD        -25.698824  51.241477 -0.5015 0.6181606    
## duality      10.614685   5.433361  1.9536 0.0562427 .  
## Gage          0.432646   0.412089  1.0499 0.2987209    
## Gtenue        0.082918   0.081872  1.0128 0.3159487    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    8595.1
## Residual Sum of Squares: 5493.7
## R-Squared:      0.36083
## Adj. R-Squared: -0.015148
## F-statistic: 2.21472 on 13 and 51 DF, p-value: 0.022108
# random effect
model4_re <- plm(CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + tangibility + SOE +
                   Size + CENT + INSD + duality+ Gage+ Gtenue, data = pdata, model = "random") # drop gage
summary(model4_re)
## Oneway (individual) effect Random Effect Model 
##    (Swamy-Arora's transformation)
## 
## Call:
## plm(formula = CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + 
##     tangibility + SOE + Size + CENT + INSD + duality + Gage + 
##     Gtenue, data = pdata, model = "random")
## 
## Unbalanced Panel: n = 18, T = 3-5, N = 82
## 
## Effects:
##                   var std.dev share
## idiosyncratic 107.719  10.379 0.751
## individual     35.705   5.975 0.249
## theta:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.2919  0.3443  0.3865  0.3714  0.3865  0.3865 
## 
## Residuals:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## -21.816  -4.570  -0.860  -0.016   4.465  38.917 
## 
## Coefficients:
##               Estimate Std. Error z-value  Pr(>|z|)    
## (Intercept) -21.823073  31.732861 -0.6877    0.4916    
## myopia_lag1   4.867152  13.990909  0.3479    0.7279    
## Leverage    -12.773831  50.017374 -0.2554    0.7984    
## Cash        -20.265550  13.534665 -1.4973    0.1343    
## ROA         107.698241  23.855312  4.5146 6.342e-06 ***
## Growth       -0.563312   1.490404 -0.3780    0.7055    
## tangibility  26.162750  51.614536  0.5069    0.6122    
## SOE          -2.231968   4.294211 -0.5198    0.6032    
## Size          0.529629   1.664045  0.3183    0.7503    
## CENT          0.212098   0.135618  1.5639    0.1178    
## INSD        -11.593448  27.147696 -0.4271    0.6693    
## duality       2.725401   3.994101  0.6824    0.4950    
## Gage          0.390012   0.289780  1.3459    0.1783    
## Gtenue       -0.038045   0.046977 -0.8099    0.4180    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    12747
## Residual Sum of Squares: 8080.8
## R-Squared:      0.36606
## Adj. R-Squared: 0.24487
## Chisq: 38.175 on 13 DF, p-value: 0.00027048
hausman_test <- phtest(model4_fe, model4_re)
hausman_test
## 
##  Hausman Test
## 
## data:  CSR ~ myopia_lag1 + Leverage + Cash + ROA + Growth + tangibility +  ...
## chisq = 22.615, df = 13, p-value = 0.04653
## alternative hypothesis: one model is inconsistent