library(readxl)
datos_tesis1 <- read_excel("C:/Users/Isabella/Desktop/datos tesis1.xlsx",
col_types = c("numeric", "text", "text",
"text", "numeric", "text", "text",
"numeric", "text", "text", "numeric",
"text", "text", "text", "text", "text",
"text", "text", "text", "text", "text",
"text", "text"))
modelo1=glm(formula= Y~EDAD, family="binomial", data = datos_tesis1)
summary(modelo1)
##
## Call:
## glm(formula = Y ~ EDAD, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.2837 -1.2624 0.7913 1.0403 1.1535
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.04836 0.12917 -0.374 0.708
## EDAD 0.06233 0.01233 5.053 4.34e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 917.58 on 714 degrees of freedom
## AIC: 921.58
##
## Number of Fisher Scoring iterations: 4
modelo2=glm(formula= Y~EMPLEADOS, family="binomial", data = datos_tesis1)
summary(modelo2)
##
## Call:
## glm(formula = Y ~ EMPLEADOS, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.3518 -1.3665 0.9267 0.9994 0.9994
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.43427 0.08143 5.333 9.65e-08 ***
## EMPLEADOS 0.18884 0.07666 2.463 0.0138 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 939.84 on 714 degrees of freedom
## AIC: 943.84
##
## Number of Fisher Scoring iterations: 4
modelo3=glm(formula =Y ~+DEUDAASUMIDA, family = "binomial", data=datos_tesis1)
summary(modelo3)
##
## Call:
## glm(formula = Y ~ +DEUDAASUMIDA, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.3119 -1.0654 0.3784 1.2936 1.2936
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2692 0.0961 -2.801 0.00509 **
## DEUDAASUMIDA1 2.8699 0.2565 11.190 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 741.64 on 714 degrees of freedom
## AIC: 745.64
##
## Number of Fisher Scoring iterations: 5
modelo4=glm(formula =Y ~FUENTEDEUDA, family = "binomial", data=datos_tesis1)
summary(modelo4)
##
## Call:
## glm(formula = Y ~ FUENTEDEUDA, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.7825 -1.0654 0.2052 1.2936 1.2936
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2692 0.0961 -2.801 0.00509 **
## FUENTEDEUDA1 4.1193 0.4621 8.915 < 2e-16 ***
## FUENTEDEUDA2 0.5569 0.7698 0.723 0.46943
## FUENTEDEUDA3 0.4233 0.5646 0.750 0.45336
## FUENTEDEUDA4 0.6057 0.5934 1.021 0.30739
## FUENTEDEUDA5 14.8353 509.6521 0.029 0.97678
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 695.85 on 710 degrees of freedom
## AIC: 707.85
##
## Number of Fisher Scoring iterations: 13
modelo5=glm(formula =Y ~CC, family = "binomial", data=datos_tesis1)
summary(modelo5)
##
## Call:
## glm(formula = Y ~ CC, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.5928 -1.3348 0.8127 1.0278 1.0278
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.36270 0.08881 4.084 4.43e-05 ***
## CC1 0.57557 0.18345 3.138 0.0017 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 937.61 on 714 degrees of freedom
## AIC: 941.61
##
## Number of Fisher Scoring iterations: 4
modelo6=glm(formula =Y ~FORMAJURIDICA, family = "binomial", data=datos_tesis1)
summary(modelo6)
##
## Call:
## glm(formula = Y ~ FORMAJURIDICA, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4823 -1.3663 0.9005 0.9996 0.9996
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.43382 0.09146 4.743 2.1e-06 ***
## FORMAJURIDICA1 0.25932 0.17173 1.510 0.131
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 944.97 on 713 degrees of freedom
## Residual deviance: 942.66 on 712 degrees of freedom
## (2 observations deleted due to missingness)
## AIC: 946.66
##
## Number of Fisher Scoring iterations: 4
modelo7=glm(formula =Y ~RUT, family = "binomial", data=datos_tesis1)
summary(modelo7)
##
## Call:
## glm(formula = Y ~ RUT, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.5365 -1.2106 0.8567 0.8567 1.1446
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.07778 0.11898 0.654 0.513
## RUT1 0.73566 0.15814 4.652 3.29e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 947.87 on 715 degrees of freedom
## Residual deviance: 926.05 on 714 degrees of freedom
## AIC: 930.05
##
## Number of Fisher Scoring iterations: 4
modelo8=glm(formula =Y ~SOLVENCIA, family = "binomial", data=datos_tesis1)
summary(modelo8)
##
## Call:
## glm(formula = Y ~ SOLVENCIA, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.3657 0.3545 0.3545 0.4337 0.4337
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.7354 0.2979 9.183 <2e-16 ***
## SOLVENCIA1 -0.4187 0.4957 -0.845 0.398
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 138.20 on 274 degrees of freedom
## Residual deviance: 137.52 on 273 degrees of freedom
## (441 observations deleted due to missingness)
## AIC: 141.52
##
## Number of Fisher Scoring iterations: 5
modelo9=glm(formula =Y ~MORA, family = "binomial", data=datos_tesis1)
summary(modelo9)
##
## Call:
## glm(formula = Y ~ MORA, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.3515 0.3607 0.3607 0.3607 0.5553
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.6997 0.2583 10.453 <2e-16 ***
## MORA1 -0.9079 0.6750 -1.345 0.179
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 138.20 on 274 degrees of freedom
## Residual deviance: 136.67 on 273 degrees of freedom
## (441 observations deleted due to missingness)
## AIC: 140.67
##
## Number of Fisher Scoring iterations: 5
modelo10=glm(formula =Y ~+MOTIVO, family = "binomial", data=datos_tesis1)
summary(modelo10)
##
## Call:
## glm(formula = Y ~ +MOTIVO, family = "binomial", data = datos_tesis1)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.4924 0.3027 0.3826 0.4118 0.4118
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.4248 0.3299 7.350 1.99e-13 ***
## MOTIVO2 0.1529 0.5368 0.285 0.776
## MOTIVO3 0.6355 0.6766 0.939 0.348
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 138.20 on 274 degrees of freedom
## Residual deviance: 137.23 on 272 degrees of freedom
## (441 observations deleted due to missingness)
## AIC: 143.23
##
## Number of Fisher Scoring iterations: 5