library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.3.2
## Warning: package 'ggplot2' was built under R version 4.3.1
## Warning: package 'tibble' was built under R version 4.3.1
## Warning: package 'tidyr' was built under R version 4.3.1
## Warning: package 'readr' was built under R version 4.3.2
## Warning: package 'purrr' was built under R version 4.3.1
## Warning: package 'dplyr' was built under R version 4.3.1
## Warning: package 'stringr' was built under R version 4.3.1
## Warning: package 'forcats' was built under R version 4.3.2
## Warning: package 'lubridate' was built under R version 4.3.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.3     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.0
## ✔ purrr     1.0.2     
## ── 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(ltm)
## Warning: package 'ltm' was built under R version 4.3.3
## Loading required package: MASS
## 
## Attaching package: 'MASS'
## 
## The following object is masked from 'package:dplyr':
## 
##     select
## 
## Loading required package: msm
## Warning: package 'msm' was built under R version 4.3.3
## Loading required package: polycor
## Warning: package 'polycor' was built under R version 4.3.3
library(dplyr)
library(stats)
library(fastDummies)
## Warning: package 'fastDummies' was built under R version 4.3.3
## Thank you for using fastDummies!
## To acknowledge our work, please cite the package:
## Kaplan, J. & Schlegel, B. (2023). fastDummies: Fast Creation of Dummy (Binary) Columns and Rows from Categorical Variables. Version 1.7.1. URL: https://github.com/jacobkap/fastDummies, https://jacobkap.github.io/fastDummies/.
library(knitr)
## Warning: package 'knitr' was built under R version 4.3.1
library(data.table)
## Warning: package 'data.table' was built under R version 4.3.1
## 
## Attaching package: 'data.table'
## 
## The following objects are masked from 'package:lubridate':
## 
##     hour, isoweek, mday, minute, month, quarter, second, wday, week,
##     yday, year
## 
## The following objects are masked from 'package:dplyr':
## 
##     between, first, last
## 
## The following object is masked from 'package:purrr':
## 
##     transpose
library(formattable)
## Warning: package 'formattable' was built under R version 4.3.3
## 
## Attaching package: 'formattable'
## 
## The following object is masked from 'package:MASS':
## 
##     area
library(DT)
## Warning: package 'DT' was built under R version 4.3.3
df <- read.csv2("basak_sayisal_veriler_c.csv")
df <- df[-c(43),]
#glimpse(df)
extract_factors <- function (df,what,howmany,reduce=0,rotat="promax"){
  cat("________________ START --> ", what, "_____________________") 
  cat("\n")
  center <- function(x) { return (x - mean(x))}
  df_sub <- df %>% dplyr::select(starts_with(what)) %>% mutate(across(everything(), center)) 
  CA <- round(cronbach.alpha(df_sub) $ alpha,2)
  cat("\n")
  cat("cronbach_alpa =", CA) 
  cat("\n")
  if (reduce != 0) df_sub=df_sub[,-reduce]
  FA<- df_sub%>%factanal(.,howmany, scores ="regression",rotation=rotat)
  print(FA $ loadings)
  explained <- 1-FA $ uniquenesses
  barplot(explained,cex.names=0.7, col=1:length(explained),
        main="faktor analizining acikladigi oranlar", cex.main=0.8)
  cat("\n")
  cat("faktor analizining acikladigi oranlar:");cat("\n")
  explained_props <- as.data.frame(1-FA $ uniquenesses)
  colnames(explained_props) ="explained_variances"
  print(explained_props);cat("\n")
  cat("likelihood ratio test | p-value:", FA $ PVAL);  cat("\n")
  if(FA $ PVAL<0.05) print("factors are not sufficient") 
  else cat("\n", "factors are sufficient") 
  cat("\n")
  cat("________________ END _____________________")
 
  outcome <-list(FA,df_sub)
  return(outcome)
}
dummy_func <- function (df,this_X,this_key) {
  dummy <- list()
  for (a in 1:length(this_X)) {
  dummy[[a]] <- df %>%
  dplyr::select(starts_with(this_key)) %>% 
  dplyr::select(c(this_X[a])) %>% 
  dummy_cols %>%
  dplyr::select(where(is.numeric)) %>%
  dplyr::select(c(-1)) }
  dummies_as_df <- do.call(data.frame,dummy)
  return(dummies_as_df)
}
show_model_details <- function(model_now){
  cat("\n")
  model_now %>% 
  cooks.distance %>% 
  plot(.,type="h",col="black",
    main=paste(model_now $call[2],"cooks distances (verilerin modele etkileri)"),  
    cex.main = 0.6)
    abline(h=1,lty=2,col="red")
    text(1:dim(model.matrix(model_now))[1],cooks.distance(model_now),
         rownames(model.matrix(model_now)),cex=0.7)
  cat(rep("##",3),sep="")
  paste("Y =", model_now $call[2]) %>% print 
  cat(rep("##",3),sep="")
  cat("\n")
  model_now %>% summary %>% print
  
}
make_model <- function(df,Y_df,dummies,this_key){
 
df_pilot <- cbind(Y_df,dummies) 
model_sosyal_cevresel_boyut <- lm(df_pilot $sosyal_cevresel_donusum~.,data = df_pilot[,-c(2)]) 

model_sosyal_cevresel_boyut%>%show_model_details

model_verimlilik_boyutu <- lm(df_pilot $ verimlilik_boyutu~.,data = df_pilot [,-c(1)]) 
model_verimlilik_boyutu%>%show_model_details}
df_or <- df
df %>%
  dplyr::select(starts_with("isletme") | starts_with("kisi")) %>% names
##  [1] "isletme_kisi_egitim"  "isletme_sektor"       "isletme_kume_1"      
##  [4] "isletme_kume_2"       "isletme_isim"         "isletme_yabanciOrtak"
##  [7] "isletme_yas"          "isletme_olcek"        "isletme_cal_say"     
## [10] "kisi_cinsiyet"        "kisi_bolum_poz"       "kisi_kac_yildir"
make_table <- function(df,D){
  cat(rep("\n",3))
 T <- df %>%
  dplyr::select(starts_with("isletme") | starts_with("kisi")) %>% 
  dplyr::select(all_of(D)) %>% table
  print(T)
}
olcutler <- list(1,2,6,7,9)

for (a in 1:length(olcutler)) {make_table(df,olcutler[[a]])}
## 
##  
##  
## isletme_kisi_egitim
##    Doktora     Lisans Lisansustu       Lise Yuksekokul 
##          2         78         37          1          3 
## 
##  
##  
## isletme_sektor
## Cevre-Geri Donusum            Gıda            Kamu Tuzel       Makine-Metal 
##                  8                 10                  1                 41 
##            Mobilya      Plastik-Kimya    Tekstil-Ambalaj    Ulasim-Lojistik 
##                  3                 15                  3                 23 
##             uretim                 Xx   Yapi Malzemeleri 
##                  1                  1                 15 
## 
##  
##  
## isletme_yabanciOrtak
##  Evet Hayir 
##    51    70 
## 
##  
##  
## isletme_yas
##      1 - 10 yil     11 - 30 yil 30 yildan fazla 
##              15              51              55 
## 
##  
##  
## isletme_cal_say
##      10 - 49 kisi 250 kisi ve uzeri     50 - 249 kisi 
##                19                45                57
df_sektor <-df %>% dplyr::filter(isletme_sektor != "Xx" & 
                  isletme_sektor != "Mobilya" &
                  isletme_sektor != "Kamu Tuzel" &
                  isletme_sektor != "Tekstil-Ambalaj" &
                  isletme_sektor != "uretim") 

df_sektor_egitim <- df_sektor %>% dplyr::filter(isletme_kisi_egitim != "Doktora" & 
                  isletme_kisi_egitim != "Yuksekokul" &
                    isletme_kisi_egitim != "Lise") 
df_all <- df
df <- df_sektor_egitim
see_sur <- extract_factors(df,"far_sur",2)
## ________________ START -->  far_sur _____________________
## 
## cronbach_alpa = 0.93
## 
## Loadings:
##                        Factor1 Factor2
## far_sur_kaynak                  0.959 
## far_sur_gelecek         0.455   0.455 
## far_sur_adil_is         0.660   0.234 
## far_sur_toplum          0.945  -0.125 
## far_sur_cevre_koruma    0.727   0.191 
## far_sur_paydas          0.356   0.488 
## far_sur_eko_performans          0.675 
## far_sur_calisan_hak     0.554   0.351 
## far_sur_tarim           0.672         
## 
##                Factor1 Factor2
## SS loadings      2.949   2.057
## Proportion Var   0.328   0.229
## Cumulative Var   0.328   0.556

## 
## faktor analizining acikladigi oranlar:
##                        explained_variances
## far_sur_kaynak                   0.9000740
## far_sur_gelecek                  0.7414797
## far_sur_adil_is                  0.7345475
## far_sur_toplum                   0.7218938
## far_sur_cevre_koruma             0.7842138
## far_sur_paydas                   0.6402567
## far_sur_eko_performans           0.4641977
## far_sur_calisan_hak              0.7372742
## far_sur_tarim                    0.3838830
## 
## likelihood ratio test | p-value: 0.1328375
## 
##  factors are sufficient
## ________________ END _____________________
see_sur_scores <- see_sur[[1]] $ scores
cat("\n")
see_sur_scores %>% dim %>% print
## [1] 107   2
colnames(see_sur_scores) <- c("sosyal_cevresel_donusum","verimlilik_boyutu")
see_sur_scores %>% boxplot(.,horizontal=TRUE,cex.axis=0.7,
                           col=1:dim(see_sur_scores)[2],
                           main = "Faktor analizinin turettigi bagimli degiskenler", cex.main=0.7)

du_df <- dummy_func(df,c(1),"isletme")
cat("\n")
df_sektor %>% dplyr:: select(isletme_sektor) %>% table %>% print
## isletme_sektor
## Cevre-Geri Donusum            Gıda          Makine-Metal      Plastik-Kimya 
##                  8                 10                 41                 15 
##    Ulasim-Lojistik   Yapi Malzemeleri 
##                 23                 15
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.3953 -0.7103  0.4911  0.9228  2.5819 
## 
## Coefficients:
##                                Estimate Std. Error t value Pr(>|t|)
## (Intercept)                    -0.07841    0.15593  -0.503    0.616
## isletme_kisi_egitim_Lisansustu  0.25425    0.28077   0.906    0.367
## 
## Residual standard error: 1.341 on 105 degrees of freedom
## Multiple R-squared:  0.007749,   Adjusted R-squared:  -0.001701 
## F-statistic:  0.82 on 1 and 105 DF,  p-value: 0.3673

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.5170 -0.3140 -0.0551  0.7896  3.2659 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)
## (Intercept)                     0.007079   0.157756   0.045    0.964
## isletme_kisi_egitim_Lisansustu -0.022952   0.284067  -0.081    0.936
## 
## Residual standard error: 1.357 on 105 degrees of freedom
## Multiple R-squared:  6.217e-05,  Adjusted R-squared:  -0.009461 
## F-statistic: 0.006528 on 1 and 105 DF,  p-value: 0.9358
du_df <- dummy_func(df,c(2),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.1846 -0.7949  0.4506  0.9138  2.7925 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)
## (Intercept)                      0.24519    0.47588   0.515    0.608
## isletme_sektor_Gıda...          -0.06818    0.67300  -0.101    0.920
## isletme_sektor_Makine.Metal     -0.53429    0.52242  -1.023    0.309
## isletme_sektor_Plastik.Kimya    -0.41752    0.58927  -0.709    0.480
## isletme_sektor_Ulasim.Lojistik   0.03522    0.55571   0.063    0.950
## isletme_sektor_Yapi.Malzemeleri  0.04236    0.58927   0.072    0.943
## 
## Residual standard error: 1.346 on 101 degrees of freedom
## Multiple R-squared:  0.0389, Adjusted R-squared:  -0.008676 
## F-statistic: 0.8177 on 5 and 101 DF,  p-value: 0.5399

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.4951 -0.4760  0.0104  0.6643  2.8679 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)
## (Intercept)                      0.033726   0.484390   0.070    0.945
## isletme_sektor_Gıda...          -0.007752   0.685031  -0.011    0.991
## isletme_sektor_Makine.Metal     -0.048467   0.531755  -0.091    0.928
## isletme_sektor_Plastik.Kimya     0.371334   0.599810   0.619    0.537
## isletme_sektor_Ulasim.Lojistik  -0.115081   0.565646  -0.203    0.839
## isletme_sektor_Yapi.Malzemeleri -0.312980   0.599810  -0.522    0.603
## 
## Residual standard error: 1.37 on 101 degrees of freedom
## Multiple R-squared:  0.01965,    Adjusted R-squared:  -0.02889 
## F-statistic: 0.4048 on 5 and 101 DF,  p-value: 0.8445
du_df <- dummy_func(df,c(6),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.6835 -0.7003  0.5213  0.7989  2.2936 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                 -0.2782     0.1953  -1.425   0.1571  
## isletme_yabanciOrtak_Hayir   0.4881     0.2586   1.887   0.0619 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.324 on 105 degrees of freedom
## Multiple R-squared:  0.03281,    Adjusted R-squared:  0.0236 
## F-statistic: 3.562 on 1 and 105 DF,  p-value: 0.06188

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.6901 -0.3508  0.0649  0.7310  3.4089 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)
## (Intercept)                  0.1802     0.1987   0.907    0.367
## isletme_yabanciOrtak_Hayir  -0.3161     0.2632  -1.201    0.232
## 
## Residual standard error: 1.348 on 105 degrees of freedom
## Multiple R-squared:  0.01355,    Adjusted R-squared:  0.004155 
## F-statistic: 1.442 on 1 and 105 DF,  p-value: 0.2325
du_df <- dummy_func(df,c(7),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.1695 -0.8802  0.4165  0.7963  2.8077 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                   0.5081     0.3412   1.489   0.1394  
## isletme_yas_11...30.yil      -0.8124     0.3939  -2.062   0.0417 *
## isletme_yas_30.yildan.fazla  -0.3790     0.3918  -0.967   0.3357  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.321 on 104 degrees of freedom
## Multiple R-squared:  0.04634,    Adjusted R-squared:  0.028 
## F-statistic: 2.527 on 2 and 104 DF,  p-value: 0.08481

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.6155 -0.4027 -0.1403  0.8234  3.0485 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                  -0.8944     0.3386  -2.641  0.00954 **
## isletme_yas_11...30.yil       1.1189     0.3910   2.861  0.00510 **
## isletme_yas_30.yildan.fazla   0.9648     0.3889   2.481  0.01472 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.312 on 104 degrees of freedom
## Multiple R-squared:  0.07498,    Adjusted R-squared:  0.05719 
## F-statistic: 4.215 on 2 and 104 DF,  p-value: 0.01737
du_df <- dummy_func(df,c(6,7),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.3897 -0.8348  0.4283  0.9371  2.5874 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                   0.2564     0.3639   0.705   0.4826  
## isletme_yabanciOrtak_Hayir    0.4720     0.2560   1.844   0.0681 .
## isletme_yas_11...30.yil      -0.8124     0.3895  -2.086   0.0395 *
## isletme_yas_30.yildan.fazla  -0.4185     0.3880  -1.079   0.2833  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.306 on 103 degrees of freedom
## Multiple R-squared:  0.07681,    Adjusted R-squared:  0.04992 
## F-statistic: 2.857 on 3 and 103 DF,  p-value: 0.04072

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.7910 -0.4710 -0.0155  0.7801  3.2020 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                  -0.7189     0.3642  -1.974  0.05106 . 
## isletme_yabanciOrtak_Hayir   -0.3290     0.2562  -1.284  0.20202   
## isletme_yas_11...30.yil       1.1189     0.3898   2.870  0.00498 **
## isletme_yas_30.yildan.fazla   0.9923     0.3883   2.556  0.01206 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.307 on 103 degrees of freedom
## Multiple R-squared:  0.08955,    Adjusted R-squared:  0.06304 
## F-statistic: 3.377 on 3 and 103 DF,  p-value: 0.0212
du_df <- dummy_func(df,c(9),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.4017 -0.8061  0.5114  0.9627  2.5755 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)                         0.3014     0.3265   0.923    0.358
## isletme_cal_say_50...249.kisi      -0.3735     0.3780  -0.988    0.325
## isletme_cal_say_250.kisi.ve.uzeri  -0.3395     0.3898  -0.871    0.386
## 
## Residual standard error: 1.346 on 104 degrees of freedom
## Multiple R-squared:  0.009781,   Adjusted R-squared:  -0.009262 
## F-statistic: 0.5136 on 2 and 104 DF,  p-value: 0.5998

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.4455 -0.2585 -0.0066  0.6896  3.1314 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)                       -0.14384    0.32956  -0.436    0.663
## isletme_cal_say_50...249.kisi      0.07945    0.38149   0.208    0.835
## isletme_cal_say_250.kisi.ve.uzeri  0.28547    0.39341   0.726    0.470
## 
## Residual standard error: 1.359 on 104 degrees of freedom
## Multiple R-squared:  0.00704,    Adjusted R-squared:  -0.01206 
## F-statistic: 0.3687 on 2 and 104 DF,  p-value: 0.6926
du_df <- dummy_func(df,c(1,2,6,7),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0895 -0.7551  0.4423  0.8615  2.8876 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                      0.35924    0.57052   0.630   0.5304  
## isletme_kisi_egitim_Lisansustu   0.17192    0.29025   0.592   0.5550  
## isletme_sektor_Gıda...           0.08849    0.70048   0.126   0.8997  
## isletme_sektor_Makine.Metal     -0.30713    0.53151  -0.578   0.5647  
## isletme_sektor_Plastik.Kimya    -0.25452    0.58938  -0.432   0.6668  
## isletme_sektor_Ulasim.Lojistik   0.19072    0.56026   0.340   0.7343  
## isletme_sektor_Yapi.Malzemeleri  0.19926    0.59633   0.334   0.7390  
## isletme_yabanciOrtak_Hayir       0.40357    0.26459   1.525   0.1305  
## isletme_yas_11...30.yil         -0.83988    0.39979  -2.101   0.0383 *
## isletme_yas_30.yildan.fazla     -0.49003    0.40748  -1.203   0.2321  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.322 on 97 degrees of freedom
## Multiple R-squared:  0.1101, Adjusted R-squared:  0.02758 
## F-statistic: 1.334 on 9 and 97 DF,  p-value: 0.2296

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.6973 -0.5862 -0.0201  0.8337  2.7980 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                     -0.41961    0.57285  -0.732  0.46564   
## isletme_kisi_egitim_Lisansustu  -0.04769    0.29143  -0.164  0.87037   
## isletme_sektor_Gıda...          -0.35846    0.70335  -0.510  0.61146   
## isletme_sektor_Makine.Metal     -0.39300    0.53369  -0.736  0.46327   
## isletme_sektor_Plastik.Kimya     0.05720    0.59179   0.097  0.92320   
## isletme_sektor_Ulasim.Lojistik  -0.46008    0.56255  -0.818  0.41545   
## isletme_sektor_Yapi.Malzemeleri -0.67603    0.59876  -1.129  0.26166   
## isletme_yabanciOrtak_Hayir      -0.34153    0.26567  -1.286  0.20167   
## isletme_yas_11...30.yil          1.17891    0.40142   2.937  0.00414 **
## isletme_yas_30.yildan.fazla      1.10325    0.40915   2.696  0.00826 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.327 on 97 degrees of freedom
## Multiple R-squared:  0.1167, Adjusted R-squared:  0.03479 
## F-statistic: 1.424 on 9 and 97 DF,  p-value: 0.1882
du_df <- dummy_func(df,c(1,2,6,7,9),"isletme")
make_model(df,Y_df=see_sur_scores,
           dummies= du_df,
           this_key="isletme")

## ######[1] "Y = df_pilot$sosyal_cevresel_donusum ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$sosyal_cevresel_donusum ~ ., data = df_pilot[, 
##     -c(2)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.1405 -0.7985  0.4882  0.8288  2.8367 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                        0.31249    0.58203   0.537   0.5926  
## isletme_kisi_egitim_Lisansustu     0.19582    0.29630   0.661   0.5103  
## isletme_sektor_Gıda...             0.04879    0.75903   0.064   0.9489  
## isletme_sektor_Makine.Metal       -0.33183    0.59326  -0.559   0.5773  
## isletme_sektor_Plastik.Kimya      -0.27640    0.61824  -0.447   0.6558  
## isletme_sektor_Ulasim.Lojistik     0.19438    0.61257   0.317   0.7517  
## isletme_sektor_Yapi.Malzemeleri    0.18143    0.65275   0.278   0.7817  
## isletme_yabanciOrtak_Hayir         0.41840    0.27122   1.543   0.1262  
## isletme_yas_11...30.yil           -0.85382    0.45486  -1.877   0.0636 .
## isletme_yas_30.yildan.fazla       -0.46399    0.47706  -0.973   0.3332  
## isletme_cal_say_50...249.kisi      0.12152    0.47852   0.254   0.8001  
## isletme_cal_say_250.kisi.ve.uzeri -0.03920    0.51748  -0.076   0.9398  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.333 on 95 degrees of freedom
## Multiple R-squared:  0.1129, Adjusted R-squared:  0.01018 
## F-statistic: 1.099 on 11 and 95 DF,  p-value: 0.3706

## ######[1] "Y = df_pilot$verimlilik_boyutu ~ ."
## ######
## 
## Call:
## lm(formula = df_pilot$verimlilik_boyutu ~ ., data = df_pilot[, 
##     -c(1)])
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.5088 -0.5522 -0.0496  0.8396  2.7316 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                       -0.33945    0.58166  -0.584   0.5609   
## isletme_kisi_egitim_Lisansustu    -0.09348    0.29611  -0.316   0.7529   
## isletme_sektor_Gıda...            -0.12470    0.75855  -0.164   0.8698   
## isletme_sektor_Makine.Metal       -0.19492    0.59289  -0.329   0.7431   
## isletme_sektor_Plastik.Kimya       0.19684    0.61785   0.319   0.7507   
## isletme_sektor_Ulasim.Lojistik    -0.31728    0.61218  -0.518   0.6055   
## isletme_sektor_Yapi.Malzemeleri   -0.48836    0.65233  -0.749   0.4559   
## isletme_yabanciOrtak_Hayir        -0.39077    0.27105  -1.442   0.1527   
## isletme_yas_11...30.yil            1.33346    0.45457   2.933   0.0042 **
## isletme_yas_30.yildan.fazla        1.21000    0.47676   2.538   0.0128 * 
## isletme_cal_say_50...249.kisi     -0.46668    0.47822  -0.976   0.3316   
## isletme_cal_say_250.kisi.ve.uzeri -0.25866    0.51715  -0.500   0.6181   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.333 on 95 degrees of freedom
## Multiple R-squared:  0.1277, Adjusted R-squared:  0.02673 
## F-statistic: 1.265 on 11 and 95 DF,  p-value: 0.2569