library(readxl)
library(ggplot2)
library(CGPfunctions)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(lmtest)
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
#Definir directorio
setwd("G:/TRABAJO/CONSULTORIAS/TRABAJOS VARIOS/JORGE CHAVARRIA/analisis3")
data1 = read_excel("Bicuspid3.xlsx")
head(data1,5)
## # A tibble: 5 × 18
##   StudyI…¹ Relat…² RSEcalc Ellip…³ Ellip…⁴ MaxSi…⁵ MinSi…⁶ Predi…⁷ Postd…⁸   CCV
##      <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl>   <dbl> <dbl>
## 1        1   0.919       1    1.05       0    1.23    1.09       1       0  1186
## 2        2   0.879       0    1.08       0    1.63    1.35       0       0  1780
## 3        3   0.915       1    1.13       1    1.3     1.19       0       0   454
## 4        4   0.905       1    1.12       1    1.46    1.28       0       0   388
## 5        5   0.904       1    1.11       1    1.27    1.17       1       0   629
## # … with 8 more variables: Raphaecalcification <dbl>, AVAi <dbl>,
## #   MeanGradientmmHg <dbl>, ICD4mm <dbl>, ADDiameter <dbl>, ICD4mm_calc <dbl>,
## #   SVDmax <dbl>, SVDmin <dbl>, and abbreviated variable names ¹​StudyIDglobal,
## #   ²​RelativeStentExpansion, ³​Ellipticity, ⁴​Ellipticitycalc, ⁵​MaxSinAnnDcalc,
## #   ⁶​MinSinusAnnDcalc, ⁷​Predilatation, ⁸​Postdilation

ANALISIS RELATIVE STENT EXPANSION

#Relacion entre Maximum Sinus Diameter Indexed vs Relative Stent Expansion %
g1=ggplot(data=data1,mapping=
            aes(x=MaxSinAnnDcalc,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g1 +  labs(title = "Relative Stent Expansion % vs Maximum Sinus Diameter Indexed",
           x = "Maximum Sinus Diameter Indexed",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'

correlation_test1 <- cor.test(data1$MaxSinAnnDcalc, data1$RelativeStentExpansion)
print(correlation_test1)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$MaxSinAnnDcalc and data1$RelativeStentExpansion
## t = 0.89325, df = 99, p-value = 0.3739
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1079097  0.2799622
## sample estimates:
##       cor 
## 0.0894153

Podemos observar que no existe una correlacion significativa entre MaxSinAnnDcalc y RelativeStentExpansion

#Relacion entre Minimun Sinus Diameter Indexed vs Relative Stent Expansion %
g2=ggplot(data=data1,mapping=
            aes(x=MinSinusAnnDcalc,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g2 +  labs(title = "Relative Stent Expansion % vs Minimun Sinus Diameter Indexed",
           x = "Minimun Sinus Diameter Indexed",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'

correlation_test2 <- cor.test(data1$MinSinusAnnDcalc, data1$RelativeStentExpansion)
print(correlation_test2)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$MinSinusAnnDcalc and data1$RelativeStentExpansion
## t = 1.4881, df = 99, p-value = 0.1399
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04894158  0.33370504
## sample estimates:
##       cor 
## 0.1479125
#Relacion entre Postdilatation vs Relative Stent Expansion %
boxplot(data1$RelativeStentExpansion~data1$Postdilation,
        xlab = 'Postdilation',
        ylab = 'Relative Stent Expansion %',
        title=('Postdilatation vs Relative Stent Expansion %'),
          col= 'bisque')

t_test1 <- t.test(data1$RelativeStentExpansion ~ as.factor(data1$Postdilation))
print(t_test1)
## 
##  Welch Two Sample t-test
## 
## data:  data1$RelativeStentExpansion by as.factor(data1$Postdilation)
## t = -4.3214, df = 41.991, p-value = 9.307e-05
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.04023644 -0.01461914
## sample estimates:
## mean in group 0 mean in group 1 
##       0.8993949       0.9268227

Se evidencia una diferencia significativa de RelativeStentExpansion en funcion de la Postdilatacion, si postdilata aumenta la expacion relativa.

ggplot(data = data1) + geom_density(aes(x=RelativeStentExpansion,fill=factor(Postdilation)),
                                    bins=10, position = "identity",alpha = 0.5)
## Warning: Ignoring unknown parameters: bins

#Relacion entre Predilatation vs Relative Stent Expansion %
boxplot(data1$RelativeStentExpansion~data1$Predilatation,
        xlab = 'Predilatation',
        ylab = 'Relative Stent Expansion %',
        title=('Predilatation vs Relative Stent Expansion %'),
          col= 'bisque')

ggplot(data = data1) + geom_density(aes(x=RelativeStentExpansion,fill=factor(Predilatation)),
                                    bins=10, position = "identity",alpha = 0.5)
## Warning: Ignoring unknown parameters: bins

t_test2 <- t.test(data1$RelativeStentExpansion ~ as.factor(data1$Predilatation))
print(t_test2)
## 
##  Welch Two Sample t-test
## 
## data:  data1$RelativeStentExpansion by as.factor(data1$Predilatation)
## t = -0.72359, df = 70.094, p-value = 0.4717
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.018060308  0.008444153
## sample estimates:
## mean in group 0 mean in group 1 
##       0.9037507       0.9085588

No existe una diferencia significativa de RelativeStentExpansion en función de la Predilatation

#Relacion entre Raphe Calcification vs Relative Stent Expansion %
boxplot(data1$RelativeStentExpansion~data1$Raphaecalcification,
        xlab = 'Raphae Calcification',
        ylab = 'Relative Stent Expansion %',
        title=('Raphae Calcification vs Relative Stent Expansion %'),
          col= 'ivory')

ggplot(data = data1) + geom_density(aes(x=RelativeStentExpansion,fill=factor(Raphaecalcification)),
                                    bins=10, position = "identity",alpha = 0.5)
## Warning: Ignoring unknown parameters: bins

t_test3 <- t.test(data1$RelativeStentExpansion ~ as.factor(data1$Raphaecalcification))
print(t_test3)
## 
##  Welch Two Sample t-test
## 
## data:  data1$RelativeStentExpansion by as.factor(data1$Raphaecalcification)
## t = 0.50361, df = 84.234, p-value = 0.6158
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.009511937  0.015963964
## sample estimates:
## mean in group 0 mean in group 1 
##       0.9074135       0.9041875

No existe diferencia significativa de RelativeStentExpansion en función del RelativeStentExpansion

#Relacion entre AVAi vs Relative Stent Expansion %
g4=ggplot(data=data1,mapping=
            aes(x=AVAi,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g4 +  labs(title = "Relative Stent Expansion % vs AVAi",
           x = "AVAi",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 26 rows containing non-finite values (stat_smooth).
## Warning: Removed 26 rows containing missing values (geom_point).

correlation_test3 <- cor.test(data1$AVAi, data1$RelativeStentExpansion)
print(correlation_test3)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$AVAi and data1$RelativeStentExpansion
## t = 1.9905, df = 73, p-value = 0.05029
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -7.606249e-05  4.316249e-01
## sample estimates:
##       cor 
## 0.2268897

Existe correlacion positiva significativa entre AVAi y RelativeStentExpansion

#Relacion entre Mean Gradient (mmHg) vs Relative Stent Expansion %
g5=ggplot(data=data1,mapping=
            aes(x=MeanGradientmmHg,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g5 +  labs(title = "Relative Stent Expansion % vs Mean Gradient (mmHg)",
           x = "Mean Gradient (mmHg)",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'

correlation_test4 <- cor.test(data1$MeanGradientmmHg, data1$RelativeStentExpansion)
print(correlation_test4)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$MeanGradientmmHg and data1$RelativeStentExpansion
## t = -3.408, df = 99, p-value = 0.0009477
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4885334 -0.1372872
## sample estimates:
##        cor 
## -0.3240323

la correlacion entre MeanGradientmmHg y RelativeStentExpansion es negativa y significativa

#Relacion entre ICD4mm_calc(IDC4mm/Area Derived Diameter) vs Relative Stent Expansion %
g6=ggplot(data=data1,mapping=
            aes(x=ICD4mm_calc,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g6 +  labs(title = "Relative Stent Expansion % vs Intercomisural Diameter at 4 mm Indexed",
           x = "Intercomisural Diameter at 4 mm Indexed",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'

correlation_test5 <- cor.test(data1$ICD4mm_calc, data1$RelativeStentExpansion)
print(correlation_test5)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$ICD4mm_calc and data1$RelativeStentExpansion
## t = 0.08373, df = 99, p-value = 0.9334
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1873324  0.2035195
## sample estimates:
##         cor 
## 0.008414921

La correlacion es nula para estas variables

#Relacion entre CCV vs Relative Stent Expansion %
g7=ggplot(data=data1,mapping=
            aes(x=CCV,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g7 +  labs(title = "Relative Stent Expansion % vs Calcium contrast volume",
           x = "Calcium contrast volume",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'

correlation_test6 <- cor.test(data1$CCV, data1$RelativeStentExpansion)
print(correlation_test6)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$CCV and data1$RelativeStentExpansion
## t = 0.21349, df = 99, p-value = 0.8314
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1747201  0.2159854
## sample estimates:
##        cor 
## 0.02145167

La correlacion entre CCV y RelativeStentExpansion es nula.

#Relacion entre SVDmax vs Relative Stent Expansion %
g8=ggplot(data=data1,mapping=
            aes(x=SVDmax,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g8 +  labs(title = "Relative Stent Expansion % vs SVDmax",
           x = "SVDmax",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).

correlation_test7 <- cor.test(data1$SVDmax, data1$RelativeStentExpansion)
print(correlation_test7)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$SVDmax and data1$RelativeStentExpansion
## t = 2.0889, df = 97, p-value = 0.03933
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01049871 0.38896086
## sample estimates:
##       cor 
## 0.2074805

la correlacion entre SVDmax y RelativeSten expasion es significativa

#Relacion entre SVDmax vs Relative Stent Expansion %
g9=ggplot(data=data1,mapping=
            aes(x=SVDmin,y=RelativeStentExpansion,))+geom_point()+theme_bw()+
            geom_smooth(method = "lm") 

g9 +  labs(title = "Relative Stent Expansion % vs SVDmin",
           x = "SVDmin",
           y= "Relative Stent Expansion %") 
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 2 rows containing non-finite values (stat_smooth).
## Warning: Removed 2 rows containing missing values (geom_point).

correlation_test8 <- cor.test(data1$SVDmin, data1$RelativeStentExpansion)
print(correlation_test8)
## 
##  Pearson's product-moment correlation
## 
## data:  data1$SVDmin and data1$RelativeStentExpansion
## t = 2.5185, df = 97, p-value = 0.01342
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05291916 0.42439847
## sample estimates:
##       cor 
## 0.2477429

la correlacion entre SVDmin y RelativeSten expasion es significativa

#Relacion entre CCV vs RSEcalc
boxplot(data1$CCV~data1$RSEcalc,
        xlab = 'RSEcalc',
        ylab = 'CCV',
        title=('RSEcalc vs CCV'),
          col= 'ivory')

REGRESION LINEAL EN FUNCION DE RELATIVE STENT EXPANSION

#Regresion inicial
mod1=lm(RelativeStentExpansion ~ MaxSinAnnDcalc + MinSinusAnnDcalc + ICD4mm_calc + 
    CCV + Raphaecalcification + Predilatation + Postdilation, 
        data = data1)
summary(mod1)
## 
## Call:
## lm(formula = RelativeStentExpansion ~ MaxSinAnnDcalc + MinSinusAnnDcalc + 
##     ICD4mm_calc + CCV + Raphaecalcification + Predilatation + 
##     Postdilation, data = data1)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.095751 -0.012325  0.004435  0.021326  0.066917 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)          8.472e-01  6.014e-02  14.086  < 2e-16 ***
## MaxSinAnnDcalc      -4.695e-03  3.161e-02  -0.149 0.882248    
## MinSinusAnnDcalc     4.654e-02  3.785e-02   1.230 0.221975    
## ICD4mm_calc          1.149e-03  5.354e-02   0.021 0.982921    
## CCV                  2.392e-06  5.574e-06   0.429 0.668804    
## Raphaecalcification -4.606e-03  6.895e-03  -0.668 0.505758    
## Predilatation        4.301e-03  6.847e-03   0.628 0.531449    
## Postdilation         2.635e-02  7.471e-03   3.526 0.000656 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03069 on 93 degrees of freedom
## Multiple R-squared:  0.1504, Adjusted R-squared:  0.08649 
## F-statistic: 2.353 on 7 and 93 DF,  p-value: 0.02944
# Aplicar el procedimiento stepwise
mod1_1 <- step(mod1)
## Start:  AIC=-696.08
## RelativeStentExpansion ~ MaxSinAnnDcalc + MinSinusAnnDcalc + 
##     ICD4mm_calc + CCV + Raphaecalcification + Predilatation + 
##     Postdilation
## 
##                       Df Sum of Sq      RSS     AIC
## - ICD4mm_calc          1 0.0000004 0.087581 -698.08
## - MaxSinAnnDcalc       1 0.0000208 0.087602 -698.06
## - CCV                  1 0.0001734 0.087754 -697.88
## - Predilatation        1 0.0003716 0.087952 -697.65
## - Raphaecalcification  1 0.0004203 0.088001 -697.60
## - MinSinusAnnDcalc     1 0.0014236 0.089004 -696.45
## <none>                             0.087581 -696.08
## - Postdilation         1 0.0117107 0.099291 -685.41
## 
## Step:  AIC=-698.08
## RelativeStentExpansion ~ MaxSinAnnDcalc + MinSinusAnnDcalc + 
##     CCV + Raphaecalcification + Predilatation + Postdilation
## 
##                       Df Sum of Sq      RSS     AIC
## - MaxSinAnnDcalc       1 0.0000205 0.087602 -700.06
## - CCV                  1 0.0001758 0.087757 -699.88
## - Predilatation        1 0.0003727 0.087954 -699.65
## - Raphaecalcification  1 0.0004304 0.088012 -699.59
## - MinSinusAnnDcalc     1 0.0014374 0.089019 -698.44
## <none>                             0.087581 -698.08
## - Postdilation         1 0.0118207 0.099402 -687.29
## 
## Step:  AIC=-700.06
## RelativeStentExpansion ~ MinSinusAnnDcalc + CCV + Raphaecalcification + 
##     Predilatation + Postdilation
## 
##                       Df Sum of Sq      RSS     AIC
## - CCV                  1 0.0001568 0.087758 -701.88
## - Predilatation        1 0.0003847 0.087986 -701.62
## - Raphaecalcification  1 0.0004112 0.088013 -701.58
## <none>                             0.087602 -700.06
## - MinSinusAnnDcalc     1 0.0019732 0.089575 -699.81
## - Postdilation         1 0.0118180 0.099420 -689.28
## 
## Step:  AIC=-701.88
## RelativeStentExpansion ~ MinSinusAnnDcalc + Raphaecalcification + 
##     Predilatation + Postdilation
## 
##                       Df Sum of Sq      RSS     AIC
## - Raphaecalcification  1 0.0002981 0.088057 -703.53
## - Predilatation        1 0.0005818 0.088340 -703.21
## <none>                             0.087758 -701.88
## - MinSinusAnnDcalc     1 0.0018529 0.089611 -701.77
## - Postdilation         1 0.0118333 0.099592 -691.10
## 
## Step:  AIC=-703.53
## RelativeStentExpansion ~ MinSinusAnnDcalc + Predilatation + Postdilation
## 
##                    Df Sum of Sq      RSS     AIC
## - Predilatation     1 0.0004955 0.088552 -704.97
## - MinSinusAnnDcalc  1 0.0017105 0.089767 -703.59
## <none>                          0.088057 -703.53
## - Postdilation      1 0.0120953 0.100152 -692.53
## 
## Step:  AIC=-704.97
## RelativeStentExpansion ~ MinSinusAnnDcalc + Postdilation
## 
##                    Df Sum of Sq      RSS     AIC
## - MinSinusAnnDcalc  1 0.0015918 0.090144 -705.17
## <none>                          0.088552 -704.97
## - Postdilation      1 0.0122817 0.100834 -693.85
## 
## Step:  AIC=-705.17
## RelativeStentExpansion ~ Postdilation
## 
##                Df Sum of Sq      RSS     AIC
## <none>                      0.090144 -705.17
## - Postdilation  1  0.012945 0.103089 -693.62
summary(mod1_1)
## 
## Call:
## lm(formula = RelativeStentExpansion ~ Postdilation, data = data1)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.101095 -0.013223  0.003905  0.019005  0.069305 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.899395   0.003395 264.919  < 2e-16 ***
## Postdilation 0.027428   0.007274   3.771 0.000277 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03018 on 99 degrees of freedom
## Multiple R-squared:  0.1256, Adjusted R-squared:  0.1167 
## F-statistic: 14.22 on 1 and 99 DF,  p-value: 0.0002772

REGRESION LOGISTICA EN FUNCION DE RSEcalc(1;0)

#Modelo binario
mod2 <- glm(RSEcalc ~ MaxSinAnnDcalc + MinSinusAnnDcalc + ICD4mm_calc + 
    CCV + Raphaecalcification + Predilatation + Postdilation,
                data = data1, family = "binomial")
summary(mod2)
## 
## Call:
## glm(formula = RSEcalc ~ MaxSinAnnDcalc + MinSinusAnnDcalc + ICD4mm_calc + 
##     CCV + Raphaecalcification + Predilatation + Postdilation, 
##     family = "binomial", data = data1)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.8469  -1.2394   0.5693   1.0364   1.2547  
## 
## Coefficients:
##                       Estimate Std. Error z value Pr(>|z|)  
## (Intercept)         -4.2522660  4.3529152  -0.977   0.3286  
## MaxSinAnnDcalc       0.4677107  2.2286440   0.210   0.8338  
## MinSinusAnnDcalc     1.4704389  2.6871074   0.547   0.5842  
## ICD4mm_calc          1.9145984  3.7622012   0.509   0.6108  
## CCV                 -0.0002413  0.0003972  -0.608   0.5435  
## Raphaecalcification  0.2461632  0.4859645   0.507   0.6125  
## Predilatation        0.1988075  0.4853123   0.410   0.6821  
## Postdilation         1.5937102  0.6722459   2.371   0.0178 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 132.71  on 100  degrees of freedom
## Residual deviance: 123.60  on  93  degrees of freedom
## AIC: 139.6
## 
## Number of Fisher Scoring iterations: 4
# Aplicar el procedimiento stepwise
mod2_1 <- step(mod2)
## Start:  AIC=139.6
## RSEcalc ~ MaxSinAnnDcalc + MinSinusAnnDcalc + ICD4mm_calc + CCV + 
##     Raphaecalcification + Predilatation + Postdilation
## 
##                       Df Deviance    AIC
## - MaxSinAnnDcalc       1   123.65 137.65
## - Predilatation        1   123.77 137.77
## - Raphaecalcification  1   123.86 137.86
## - ICD4mm_calc          1   123.86 137.86
## - MinSinusAnnDcalc     1   123.90 137.90
## - CCV                  1   123.97 137.97
## <none>                     123.60 139.60
## - Postdilation         1   130.79 144.79
## 
## Step:  AIC=137.65
## RSEcalc ~ MinSinusAnnDcalc + ICD4mm_calc + CCV + Raphaecalcification + 
##     Predilatation + Postdilation
## 
##                       Df Deviance    AIC
## - Predilatation        1   123.81 135.81
## - Raphaecalcification  1   123.88 135.88
## - ICD4mm_calc          1   123.97 135.97
## - CCV                  1   123.98 135.98
## - MinSinusAnnDcalc     1   124.28 136.28
## <none>                     123.65 137.65
## - Postdilation         1   130.84 142.84
## 
## Step:  AIC=135.81
## RSEcalc ~ MinSinusAnnDcalc + ICD4mm_calc + CCV + Raphaecalcification + 
##     Postdilation
## 
##                       Df Deviance    AIC
## - Raphaecalcification  1   124.04 134.04
## - CCV                  1   124.04 134.04
## - ICD4mm_calc          1   124.08 134.08
## - MinSinusAnnDcalc     1   124.44 134.44
## <none>                     123.81 135.81
## - Postdilation         1   131.03 141.03
## 
## Step:  AIC=134.04
## RSEcalc ~ MinSinusAnnDcalc + ICD4mm_calc + CCV + Postdilation
## 
##                    Df Deviance    AIC
## - CCV               1   124.15 132.15
## - ICD4mm_calc       1   124.24 132.24
## - MinSinusAnnDcalc  1   124.79 132.79
## <none>                  124.04 134.04
## - Postdilation      1   131.09 139.09
## 
## Step:  AIC=132.15
## RSEcalc ~ MinSinusAnnDcalc + ICD4mm_calc + Postdilation
## 
##                    Df Deviance    AIC
## - ICD4mm_calc       1   124.34 130.34
## - MinSinusAnnDcalc  1   125.03 131.03
## <none>                  124.15 132.15
## - Postdilation      1   131.22 137.22
## 
## Step:  AIC=130.34
## RSEcalc ~ MinSinusAnnDcalc + Postdilation
## 
##                    Df Deviance    AIC
## - MinSinusAnnDcalc  1   125.51 129.51
## <none>                  124.34 130.34
## - Postdilation      1   131.26 135.26
## 
## Step:  AIC=129.51
## RSEcalc ~ Postdilation
## 
##                Df Deviance    AIC
## <none>              125.51 129.51
## - Postdilation  1   132.71 134.71
summary(mod2_1)
## 
## Call:
## glm(formula = RSEcalc ~ Postdilation, family = "binomial", data = data1)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.9962  -1.2985   0.5415   1.0609   1.0609  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)    0.2803     0.2272   1.234    0.217  
## Postdilation   1.5655     0.6615   2.367    0.018 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 132.71  on 100  degrees of freedom
## Residual deviance: 125.51  on  99  degrees of freedom
## AIC: 129.51
## 
## Number of Fisher Scoring iterations: 4