Installing libraries

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.1     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(plspm)
## 
## Attaching package: 'plspm'
## 
## The following object is masked from 'package:ggplot2':
## 
##     alpha
library(car)
## Loading required package: carData
## 
## Attaching package: 'car'
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## The following object is masked from 'package:purrr':
## 
##     some

Captura de los datos

# read data from the web 

df_articulo_12 <- read.csv("https://docs.google.com/spreadsheets/d/107LWHUEJf0R1q1NpLYlwSIHlKRK22zhxfZ2RWtxtKow/export?format=csv&gid=783998258", header = TRUE, sep = ",", stringsAsFactors = FALSE)

df_articulo_12_standardized <- data.frame(
  impact_sc = scale(df_articulo_12$impact),
  size_sc = scale(df_articulo_12$Size),
  tie_strength_sc = scale(df_articulo_12$tie_strength),
  networking_intensity_sc = scale(df_articulo_12$networking_intensity),
  structural_holes_sc = scale(df_articulo_12$structural_holes),
  CDI_sc = scale(df_articulo_12$CDI),
  tenure_sc = scale(df_articulo_12$tenure)
)

Análisis de los datos

# Inner model
inner_model <- matrix(c(
  0, 0, 0, 0,  # research_impact
  1, 0, 0, 0,  # social_capital
  1, 0, 0, 0,  # relational_capital
  1, 0, 0, 0   # cognitive_capital
), nrow = 4, ncol = 4, byrow = TRUE)

# Outer model
outer_model <- list(
  research_impact   = c("impact"),
  social_capital    = c("Size", "structural_holes"),
  relational_capital = c("tie_strength", "networking_intensity"),
  cognitive_capital = c("CDI", "tenure")
)

# Run the PLS-PM analysis
plspm_model <- plspm(df_articulo_12, inner_model, outer_model, modes = c("B", "A", "A", "A"))

# Get the summary of the results
summary(plspm_model)
## PARTIAL LEAST SQUARES PATH MODELING (PLS-PM) 
## 
## ---------------------------------------------------------- 
## MODEL SPECIFICATION 
## 1   Number of Cases      294 
## 2   Latent Variables     4 
## 3   Manifest Variables   7 
## 4   Scale of Data        Standardized Data 
## 5   Non-Metric PLS       FALSE 
## 6   Weighting Scheme     centroid 
## 7   Tolerance Crit       1e-06 
## 8   Max Num Iters        100 
## 9   Convergence Iters    3 
## 10  Bootstrapping        FALSE 
## 11  Bootstrap samples    NULL 
## 
## ---------------------------------------------------------- 
## BLOCKS DEFINITION 
##     Block         Type   Size   Mode
## 1     LV1    Exogenous      1      B
## 2     LV2   Endogenous      2      A
## 3     LV3   Endogenous      2      A
## 4     LV4   Endogenous      2      A
## 
## ---------------------------------------------------------- 
## BLOCKS UNIDIMENSIONALITY 
##      Mode  MVs  C.alpha  DG.rho  eig.1st  eig.2nd
## LV1     B    1    1.000   1.000     1.00    0.000
## LV2     A    2    0.000   0.000     1.57    0.426
## LV3     A    2    0.660   0.855     1.49    0.507
## LV4     A    2    0.051   0.678     1.03    0.974
## 
## ---------------------------------------------------------- 
## OUTER MODEL 
##                           weight  loading  communality  redundancy
## LV1                                                               
##   1 impact                 1.000    1.000        1.000      0.0000
## LV2                                                               
##   2 Size                   0.768   -0.961        0.924      0.1379
##   2 structural_holes      -0.336    0.777        0.604      0.0902
## LV3                                                               
##   3 tie_strength           0.691    0.917        0.841      0.0297
##   3 networking_intensity   0.458    0.799        0.639      0.0225
## LV4                                                               
##   4 CDI                    0.845   -0.831        0.690      0.0582
##   4 tenure                -0.557    0.535        0.286      0.0241
## 
## ---------------------------------------------------------- 
## CROSSLOADINGS 
##                              LV1      LV2      LV3     LV4
## LV1                                                       
##   1 impact                 1.000  -0.3863   0.1879   0.290
## LV2                                                       
##   2 Size                   0.422  -0.9614   0.0537   0.312
##   2 structural_holes      -0.185   0.7774   0.1752  -0.284
## LV3                                                       
##   3 tie_strength           0.189   0.1175   0.9170   0.579
##   3 networking_intensity   0.125  -0.1388   0.7991   0.185
## LV4                                                       
##   4 CDI                   -0.240   0.0216  -0.7052  -0.831
##   4 tenure                 0.158  -0.5695  -0.1999   0.535
## 
## ---------------------------------------------------------- 
## INNER MODEL 
## $LV2
##              Estimate   Std. Error     t value   Pr(>|t|)
## Intercept   -6.63e-17        0.054   -1.23e-15    1.0e+00
## LV1         -3.86e-01        0.054   -7.16e+00    6.7e-12
## 
## $LV3
##             Estimate   Std. Error    t value   Pr(>|t|)
## Intercept   1.09e-16       0.0575   1.90e-15    1.00000
## LV1         1.88e-01       0.0575   3.27e+00    0.00121
## 
## $LV4
##             Estimate   Std. Error    t value   Pr(>|t|)
## Intercept   7.32e-17        0.056   1.31e-15   1.00e+00
## LV1         2.90e-01        0.056   5.19e+00   4.01e-07
## 
## ---------------------------------------------------------- 
## CORRELATIONS BETWEEN LVs 
##         LV1      LV2     LV3     LV4
## LV1   1.000  -0.3863  0.1879   0.290
## LV2  -0.386   1.0000  0.0176  -0.335
## LV3   0.188   0.0176  1.0000   0.485
## LV4   0.290  -0.3353  0.4849   1.000
## 
## ---------------------------------------------------------- 
## SUMMARY INNER MODEL 
##            Type      R2  Block_Communality  Mean_Redundancy    AVE
## LV1   Exogenous  0.0000              1.000           0.0000  0.000
## LV2  Endogenous  0.1492              0.764           0.1141  0.764
## LV3  Endogenous  0.0353              0.740           0.0261  0.740
## LV4  Endogenous  0.0844              0.488           0.0412  0.488
## 
## ---------------------------------------------------------- 
## GOODNESS-OF-FIT 
## [1]  0.244
## 
## ---------------------------------------------------------- 
## TOTAL EFFECTS 
##    relationships  direct  indirect   total
## 1     LV1 -> LV2  -0.386         0  -0.386
## 2     LV1 -> LV3   0.188         0   0.188
## 3     LV1 -> LV4   0.290         0   0.290
## 4     LV2 -> LV3   0.000         0   0.000
## 5     LV2 -> LV4   0.000         0   0.000
## 6     LV3 -> LV4   0.000         0   0.000

VIF

library(car)
# Create a linear model
linear_model <- lm(impact_sc ~ size_sc + structural_holes_sc + tie_strength_sc + networking_intensity_sc + CDI_sc + tenure_sc,
                   data = df_articulo_12_standardized)

# Calculate VIF
vif_values <- vif(linear_model)

# Print VIF values
print(vif_values)
##                 size_sc     structural_holes_sc         tie_strength_sc 
##                1.801420                2.011733                3.148896 
## networking_intensity_sc                  CDI_sc               tenure_sc 
##                1.669127                2.583517                1.912704

Correlation matrix

Correlation between variables

library(apaTables)
library(car)

# Compute VIF
vif_values <- vif(lm(impact ~ ., data = df_articulo_12))

# Create APA-style correlation table
apa_corr_table <- apaTables::apa.cor.table(df_articulo_12)

# Add VIF row to the APA-style correlation table
apa_corr_table$Table <- rbind(apa_corr_table$Table, c("VIF", sprintf("%.2f", vif_values)))

# Print the updated APA-style correlation table
print(apa_corr_table)
## 
## 
## Means, standard deviations, and correlations with confidence intervals
##  
## 
##   Variable                M     SD    1            2            3           
##   1. impact               7.53  17.28                                       
##                                                                             
##   2. Size                 9.74  11.06 .42**                                 
##                                       [.32, .51]                            
##                                                                             
##   3. structural_holes     0.47  0.32  -.18**       -.57**                   
##                                       [-.29, -.07] [-.65, -.49]             
##                                                                             
##   4. Density              0.55  0.29  -.22**       -.63**       .97**       
##                                       [-.32, -.11] [-.69, -.55] [.96, .97]  
##                                                                             
##   5. tie_strength         2.57  1.87  .19**        -.06         .22**       
##                                       [.08, .30]   [-.17, .06]  [.11, .33]  
##                                                                             
##   6. total_weighted       44.17 71.88 .52**        .84**        -.44**      
##                                       [.43, .59]   [.80, .87]   [-.53, -.34]
##                                                                             
##   7. CDI                  0.54  0.27  -.24**       -.06         -.06        
##                                       [-.34, -.13] [-.17, .06]  [-.18, .05] 
##                                                                             
##   8. tenure               16.77 15.19 .16**        .47**        -.61**      
##                                       [.04, .27]   [.38, .56]   [-.68, -.53]
##                                                                             
##   9. networking_intensity 4.05  6.70  .13*         .20**        .05         
##                                       [.01, .24]   [.09, .31]   [-.06, .16] 
##                                                                             
##   4            5            6            7            8           
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##   .22**                                                           
##   [.10, .32]                                                      
##                                                                   
##   -.44**       .21**                                              
##   [-.52, -.34] [.10, .32]                                         
##                                                                   
##   -.06         -.77**       -.31**                                
##   [-.17, .06]  [-.82, -.72] [-.41, -.20]                          
##                                                                   
##   -.65**       -.13*        .27**        .03                      
##   [-.71, -.57] [-.24, -.02] [.16, .37]   [-.09, .14]              
##                                                                   
##   .12*         .49**        .49**        -.37**       -.23**      
##   [.01, .23]   [.40, .57]   [.40, .57]   [-.47, -.27] [-.34, -.12]
##                                                                   
## 
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations 
## that could have caused the sample correlation (Cumming, 2014).
##  * indicates p < .05. ** indicates p < .01.
## 

Cohens d

# Standardize the dataset
df_articulo_12_standardized_new <- as.data.frame(scale(df_articulo_12))

# Full model with all predictors
full_model_new <- lm(impact ~ Size + structural_holes + tie_strength + networking_intensity + CDI + tenure, data = df_articulo_12_standardized_new)

# Models without each predictor
model_without_size <- lm(impact ~ structural_holes + tie_strength + networking_intensity + CDI + tenure, data = df_articulo_12_standardized_new)
model_without_sh <- lm(impact ~ Size + tie_strength + networking_intensity + CDI + tenure, data = df_articulo_12_standardized_new)
model_without_ts <- lm(impact ~ Size + structural_holes + networking_intensity + CDI + tenure, data = df_articulo_12_standardized_new)
model_without_ni <- lm(impact ~ Size + structural_holes + tie_strength + CDI + tenure, data = df_articulo_12_standardized_new)
model_without_cdi <- lm(impact ~ Size + structural_holes + tie_strength + networking_intensity + tenure, data = df_articulo_12_standardized_new)
model_without_tenure <- lm(impact ~ Size + structural_holes + tie_strength + networking_intensity + CDI, data = df_articulo_12_standardized_new)

# Calculate R² for each model
r2_full_new <- summary(full_model_new)$r.squared
r2_without_size <- summary(model_without_size)$r.squared
r2_without_sh <- summary(model_without_sh)$r.squared
r2_without_ts <- summary(model_without_ts)$r.squared
r2_without_ni <- summary(model_without_ni)$r.squared
r2_without_cdi <- summary(model_without_cdi)$r.squared
r2_without_tenure <- summary(model_without_tenure)$r.squared

# Calculate Cohen's f² for each predictor
f2_size <- (r2_full_new - r2_without_size) / (1 - r2_full_new)
f2_sh <- (r2_full_new - r2_without_sh) / (1 - r2_full_new)
f2_ts <- (r2_full_new - r2_without_ts) / (1 - r2_full_new)
f2_ni <- (r2_full_new - r2_without_ni) / (1 - r2_full_new)
f2_cdi <- (r2_full_new - r2_without_cdi) / (1 - r2_full_new)
f2_tenure <- (r2_full_new - r2_without_tenure) / (1 - r2_full_new)

# Print Cohen's f² values
cat("Cohen's f² for Size: ", f2_size, "\n")
## Cohen's f² for Size:  0.1753342
cat("Cohen's f² for Structural_Holes: ", f2_sh, "\n")
## Cohen's f² for Structural_Holes:  0.0002177353
cat("Cohen's f² for Tie_Strength: ", f2_ts, "\n")
## Cohen's f² for Tie_Strength:  0.01131456
cat("Cohen's f² for Networking_Intensity: ", f2_ni, "\n")
## Cohen's f² for Networking_Intensity:  0.01105287
cat("Cohen's f² for CDI: ", f2_cdi, "\n")
## Cohen's f² for CDI:  0.008076722
cat("Cohen's f² for Tenure: ", f2_tenure, "\n")
## Cohen's f² for Tenure:  0.003003241