#Đưa dữ liệu vào R
library(haven)
endo <- read_sav("D:/Deskop/Endobronchial_biopsy/Xử lý số liệu/RStudio/dulieuchuan.sav")
head(endo)
## # A tibble: 6 × 108
## stt hoten namsinh gioi ldvv V6 hutthuocla goinam tha suytim dtd
## <dbl> <chr> <dbl> <dbl> <dbl> <chr> <dbl+lbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 NGUYEN V… 1948 1 5 "" 1 [Còn hú… 30 0 0 0
## 2 2 LY VAN T… 1956 1 5 "" 1 [Còn hú… 20 1 0 0
## 3 3 DIEN CHE 1954 1 5 "" 1 [Còn hú… 40 1 0 0
## 4 4 NGUYEN V… 1976 1 2 "" 0 [Không … NA 0 0 0
## 5 5 LUU VAN … 1956 1 1 "" 1 [Còn hú… 20 1 0 0
## 6 6 NGUYEN M… 1960 1 1 "" 0 [Không … NA 0 0 0
## # ℹ 97 more variables: ckd <dbl>, xogan <dbl>, doiquy <dbl>, ungthu <dbl>,
## # loaiut <chr>, copd <dbl>, hen <dbl>, lao <dbl>, laomp <dbl>, cc <dbl>,
## # cn <dbl>, sot <dbl>, met <dbl>, sutcan <dbl>, chanan <dbl>, hokhan <dbl>,
## # hodam <dbl>, homau <dbl>, daunguc <dbl>, khotho <dbl>, khangiong <dbl>,
## # nuotnghen <dbl>, sohach <dbl>, hc3giam <dbl>, tn <dbl>, tt <dbl>, nt <dbl>,
## # khonggn <dbl>, kinhmo <dbl>, hang <dbl>, notmo <dbl>, dam <dbl>,
## # dongdac <dbl>, xep <dbl>, tdmp <dbl>, trenp <dbl>, giuap <dbl>, …
endo$gpb1 <- factor(endo$gpb,
levels = c(1, 0), # chú ý: 1 là UTP, 0 là không UTP
labels = c("UTP", "Không UTP"))
endo$nhomtuoi1 <- factor(endo$nhomtuoi, levels = c(1, 2, 3), labels = c("<50", "50-70", ">70"))
model_nhomtuoi1 <- glm(gpb ~ nhomtuoi1, data = endo, family = binomial)
summary(model_nhomtuoi1)
##
## Call:
## glm(formula = gpb ~ nhomtuoi1, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.2528 0.8018 -1.562 0.118
## nhomtuoi150-70 0.6597 0.8466 0.779 0.436
## nhomtuoi1>70 1.4351 0.8570 1.674 0.094 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 146.99 on 109 degrees of freedom
## AIC: 152.99
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_nhomtuoi1), confint(model_nhomtuoi1)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.2857143 0.04257115 1.182077
## nhomtuoi150-70 1.9342105 0.42120919 13.778222
## nhomtuoi1>70 4.2000000 0.89583766 30.379652
round(exp(cbind(OR = coef(model_nhomtuoi1), confint(model_nhomtuoi1))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.29 0.04 1.18
## nhomtuoi150-70 1.93 0.42 13.78
## nhomtuoi1>70 4.20 0.90 30.38
# Bảng tần số 2x2
tbl <- table(endo$gioi, endo$gpb)
# Tính % theo cột
percent_col <- prop.table(tbl, margin = 2) * 100
# Làm tròn và kết hợp với tần số
result <- cbind(tbl, round(percent_col, 2))
# Đổi tên cột rõ ràng
colnames(result) <- c("Không UT (n)", "Ung thư (n)", "Không UT (%)", "Ung thư (%)")
# Hiển thị
result
## Không UT (n) Ung thư (n) Không UT (%) Ung thư (%)
## 0 16 9 24.62 19.15
## 1 49 38 75.38 80.85
model_gioi <- glm(gpb ~ gioi, data = endo, family = binomial)
summary(model_gioi)
##
## Call:
## glm(formula = gpb ~ gioi, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5754 0.4167 -1.381 0.167
## gioi 0.3211 0.4694 0.684 0.494
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.88 on 110 degrees of freedom
## AIC: 155.88
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_gioi), confint(model_gioi)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.562500 0.2380299 1.247758
## gioi 1.378685 0.5580359 3.576569
round(exp(cbind(OR = coef(model_gioi), confint(model_gioi))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.56 0.24 1.25
## gioi 1.38 0.56 3.58
endo$hutthuocla2 <- factor(endo$hutthuocla, levels = c(0, 1, 2), labels = c("khong", "co", "Ngung"))
model_htl <- glm(gpb ~ hutthuocla2, data = endo, family = binomial)
summary(model_htl)
##
## Call:
## glm(formula = gpb ~ hutthuocla2, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.8473 0.3086 -2.746 0.00604 **
## hutthuocla2co 0.9307 0.4227 2.201 0.02770 *
## hutthuocla2Ngung 0.8473 0.6172 1.373 0.16982
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 146.95 on 109 degrees of freedom
## AIC: 152.95
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_htl), confint(model_htl)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.4285714 0.2272665 0.7693635
## hutthuocla2co 2.5362319 1.1194644 5.9111025
## hutthuocla2Ngung 2.3333333 0.6883581 8.0000369
round(exp(cbind(OR = coef(model_htl), confint(model_htl))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.43 0.23 0.77
## hutthuocla2co 2.54 1.12 5.91
## hutthuocla2Ngung 2.33 0.69 8.00
model_copd <- glm(gpb ~ copd, data = endo, family = binomial)
summary(model_copd)
##
## Call:
## glm(formula = gpb ~ copd, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.31634 0.20051 -1.578 0.115
## copd -0.08913 0.67592 -0.132 0.895
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.34 on 110 degrees of freedom
## AIC: 156.34
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_copd), confint(model_copd)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7288136 0.4893514 1.076678
## copd 0.9147287 0.2223989 3.398374
round(exp(cbind(OR = coef(model_copd), confint(model_copd))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.73 0.49 1.08
## copd 0.91 0.22 3.40
model_lao <- glm(gpb ~ lao, data = endo, family = binomial)
summary(model_lao)
##
## Call:
## glm(formula = gpb ~ lao, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4595 0.2129 -2.159 0.0309 *
## lao 0.7780 0.5111 1.522 0.1280
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 150.01 on 110 degrees of freedom
## AIC: 154.01
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_lao), confint(model_lao)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6315789 0.4127457 0.9537812
## lao 2.1770833 0.8054137 6.1210460
round(exp(cbind(OR = coef(model_lao), confint(model_lao))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.63 0.41 0.95
## lao 2.18 0.81 6.12
model_laomp <- glm(gpb ~ laomp, data = endo, family = binomial)
summary(model_laomp)
##
## Call:
## glm(formula = gpb ~ laomp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3302 0.1933 -1.708 0.0876 .
## laomp 0.3302 1.4274 0.231 0.8170
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.31 on 110 degrees of freedom
## AIC: 156.31
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_laomp), confint(model_laomp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.718750 0.48959220 1.046897
## laomp 1.391304 0.05408245 35.794499
round(exp(cbind(OR = coef(model_laomp), confint(model_laomp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.72 0.49 1.05
## laomp 1.39 0.05 35.79
model_sot <- glm(gpb ~ sot, data = endo, family = binomial)
summary(model_sot)
##
## Call:
## glm(formula = gpb ~ sot, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.07796 0.22809 -0.342 0.7325
## sot -0.83833 0.43821 -1.913 0.0557 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.51 on 110 degrees of freedom
## AIC: 152.51
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_sot), confint(model_sot)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.9250000 0.5896666 1.4472458
## sot 0.4324324 0.1769368 0.9987641
round(exp(cbind(OR = coef(model_sot), confint(model_sot))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.93 0.59 1.45
## sot 0.43 0.18 1.00
model_met <- glm(gpb ~ met, data = endo, family = binomial)
summary(model_met)
##
## Call:
## glm(formula = gpb ~ met, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2822 0.1953 -1.445 0.148
## met -1.1041 1.1350 -0.973 0.331
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.23 on 110 degrees of freedom
## AIC: 155.23
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_met), confint(model_met)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7540984 0.51191942 1.103230
## met 0.3315217 0.01664777 2.333705
round(exp(cbind(OR = coef(model_met), confint(model_met))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.75 0.51 1.10
## met 0.33 0.02 2.33
model_chanan <- glm(gpb ~ chanan, data = endo, family = binomial)
summary(model_chanan)
##
## Call:
## glm(formula = gpb ~ chanan, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5341 0.2160 -2.473 0.0134 *
## chanan 1.1531 0.5162 2.234 0.0255 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 147.10 on 110 degrees of freedom
## AIC: 151.1
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_chanan), confint(model_chanan)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.5862069 0.3802664 0.8896239
## chanan 3.1680672 1.1800137 9.1625380
round(exp(cbind(OR = coef(model_chanan), confint(model_chanan))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.59 0.38 0.89
## chanan 3.17 1.18 9.16
model_sutcan <- glm(gpb ~ sutcan, data = endo, family = binomial)
summary(model_sutcan)
##
## Call:
## glm(formula = gpb ~ sutcan, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4925 0.2706 -1.820 0.0688 .
## sutcan 0.3441 0.3843 0.895 0.3707
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.56 on 110 degrees of freedom
## AIC: 155.56
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_sutcan), confint(model_sutcan)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6111111 0.3543515 1.030139
## sutcan 1.4106583 0.6651146 3.015013
round(exp(cbind(OR = coef(model_sutcan), confint(model_sutcan))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.61 0.35 1.03
## sutcan 1.41 0.67 3.02
model_hokhan <- glm(gpb ~ hokhan, data = endo, family = binomial)
summary(model_hokhan)
##
## Call:
## glm(formula = gpb ~ hokhan, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3438 0.2093 -1.642 0.101
## hokhan 0.1206 0.5185 0.233 0.816
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.31 on 110 degrees of freedom
## AIC: 156.31
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_hokhan), confint(model_hokhan)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7090909 0.4675111 1.065222
## hokhan 1.1282051 0.3977200 3.117523
round(exp(cbind(OR = coef(model_hokhan), confint(model_hokhan))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.71 0.47 1.07
## hokhan 1.13 0.40 3.12
model_hodam <- glm(gpb ~ hodam, data = endo, family = binomial)
summary(model_hodam)
##
## Call:
## glm(formula = gpb ~ hodam, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2231 0.3000 -0.744 0.457
## hodam -0.1699 0.3899 -0.436 0.663
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.17 on 110 degrees of freedom
## AIC: 156.17
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_hodam), confint(model_hodam)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.80000 0.4396049 1.437147
## hodam 0.84375 0.3921357 1.818037
round(exp(cbind(OR = coef(model_hodam), confint(model_hodam))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.80 0.44 1.44
## hodam 0.84 0.39 1.82
model_homau <- glm(gpb ~ homau, data = endo, family = binomial)
summary(model_homau)
##
## Call:
## glm(formula = gpb ~ homau, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4238 0.2144 -1.977 0.0481 *
## homau 0.5191 0.4867 1.067 0.2861
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.22 on 110 degrees of freedom
## AIC: 155.22
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_homau), confint(model_homau)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6545455 0.4266673 0.9917968
## homau 1.6805556 0.6449437 4.4315823
round(exp(cbind(OR = coef(model_homau), confint(model_homau))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.65 0.43 0.99
## homau 1.68 0.64 4.43
model_daunguc <- glm(gpb ~ daunguc, data = endo, family = binomial)
summary(model_daunguc)
##
## Call:
## glm(formula = gpb ~ daunguc, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.6931 0.2739 -2.531 0.0114 *
## daunguc 0.7701 0.3899 1.975 0.0483 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.39 on 110 degrees of freedom
## AIC: 152.39
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_daunguc), confint(model_daunguc)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.50 0.2866792 0.844365
## daunguc 2.16 1.0123424 4.691492
round(exp(cbind(OR = coef(model_daunguc), confint(model_daunguc))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.50 0.29 0.84
## daunguc 2.16 1.01 4.69
model_khotho <- glm(gpb ~ khotho, data = endo, family = binomial)
summary(model_khotho)
##
## Call:
## glm(formula = gpb ~ khotho, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.7621 0.3237 -2.355 0.0185 *
## khotho 0.7033 0.4045 1.739 0.0821 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 149.25 on 110 degrees of freedom
## AIC: 153.25
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_khotho), confint(model_khotho)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.4666667 0.2400948 0.863438
## khotho 2.0204082 0.9251292 4.551050
round(exp(cbind(OR = coef(model_khotho), confint(model_khotho))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.47 0.24 0.86
## khotho 2.02 0.93 4.55
model_khangiong <- glm(gpb ~ khangiong, data = endo, family = binomial)
summary(model_khangiong)
##
## Call:
## glm(formula = gpb ~ khangiong, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4212 0.1986 -2.121 0.0339 *
## khangiong 2.0307 1.1133 1.824 0.0682 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 147.75 on 110 degrees of freedom
## AIC: 151.75
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_khangiong), confint(model_khangiong)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.656250 0.441779 0.9646243
## khangiong 7.619048 1.174862 148.7335249
round(exp(cbind(OR = coef(model_khangiong), confint(model_khangiong))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.66 0.44 0.96
## khangiong 7.62 1.17 148.73
model_nuotnghen <- glm(gpb ~ nuotnghen, data = endo, family = binomial)
summary(model_nuotnghen)
##
## Call:
## glm(formula = gpb ~ nuotnghen, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4132 0.1966 -2.102 0.0356 *
## nuotnghen 16.9793 1199.7724 0.014 0.9887
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 145.21 on 110 degrees of freedom
## AIC: 149.21
##
## Number of Fisher Scoring iterations: 15
model_sohach <- glm(gpb ~ sohach, data = endo, family = binomial)
summary(model_sohach)
##
## Call:
## glm(formula = gpb ~ sohach, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4136 0.2013 -2.055 0.0399 *
## sohach 1.1067 0.7352 1.505 0.1322
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 149.93 on 110 degrees of freedom
## AIC: 153.93
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_sohach), confint(model_sohach)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6612903 0.4427666 0.9772165
## sohach 3.0243902 0.7537051 14.9679749
round(exp(cbind(OR = coef(model_sohach), confint(model_sohach))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.66 0.44 0.98
## sohach 3.02 0.75 14.97
model_hc3giam<- glm(gpb ~ hc3giam, data = endo, family = binomial)
summary(model_hc3giam)
##
## Call:
## glm(formula = gpb ~ hc3giam, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.32091 0.21595 -1.486 0.137
## hc3giam -0.01556 0.46697 -0.033 0.973
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.36 on 110 degrees of freedom
## AIC: 156.36
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_hc3giam), confint(model_hc3giam)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7254902 0.4721095 1.104256
## hc3giam 0.9845560 0.3856124 2.445383
round(exp(cbind(OR = coef(model_hc3giam), confint(model_hc3giam))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.73 0.47 1.10
## hc3giam 0.98 0.39 2.45
model_tn<- glm(gpb ~ tn, data = endo, family = binomial)
summary(model_tn)
##
## Call:
## glm(formula = gpb ~ tn, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.7309 0.2387 -3.062 0.00220 **
## tn 1.3775 0.4422 3.115 0.00184 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 142.08 on 110 degrees of freedom
## AIC: 146.08
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_tn), confint(model_tn)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.4814815 0.2970605 0.7605928
## tn 3.9650350 1.6973833 9.7117760
round(exp(cbind(OR = coef(model_tn), confint(model_tn))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.48 0.3 0.76
## tn 3.97 1.7 9.71
model_nt<- glm(gpb ~ nt, data = endo, family = binomial)
summary(model_nt)
##
## Call:
## glm(formula = gpb ~ nt, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.02667 0.23096 -0.115 0.9081
## nt -0.96658 0.43633 -2.215 0.0267 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 147.14 on 110 degrees of freedom
## AIC: 151.14
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_nt), confint(model_nt)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.9736842 0.6177043 1.5334071
## nt 0.3803804 0.1560450 0.8740966
round(exp(cbind(OR = coef(model_nt), confint(model_nt))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.97 0.62 1.53
## nt 0.38 0.16 0.87
model_tt<- glm(gpb ~ tt, data = endo, family = binomial)
summary(model_tt)
##
## Call:
## glm(formula = gpb ~ tt, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3589 0.1965 -1.827 0.0677 .
## tt 0.7644 0.9338 0.819 0.4130
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.67 on 110 degrees of freedom
## AIC: 155.67
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_tt), confint(model_tt)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6984127 0.4725376 1.02319
## tt 2.1477273 0.3425033 16.81516
round(exp(cbind(OR = coef(model_tt), confint(model_tt))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.70 0.47 1.02
## tt 2.15 0.34 16.82
model_khonggn<- glm(gpb ~ khonggn, data = endo, family = binomial)
summary(model_khonggn)
##
## Call:
## glm(formula = gpb ~ khonggn, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4463 0.2264 -1.971 0.0487 *
## khonggn 0.4463 0.4296 1.039 0.2989
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.28 on 110 degrees of freedom
## AIC: 155.28
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_khonggn), confint(model_khonggn)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6400 0.4069359 0.9920608
## khonggn 1.5625 0.6710724 3.6522698
round(exp(cbind(OR = coef(model_khonggn), confint(model_khonggn))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.64 0.41 0.99
## khonggn 1.56 0.67 3.65
model_kinhmo<- glm(gpb ~ kinhmo, data = endo, family = binomial)
summary(model_kinhmo)
##
## Call:
## glm(formula = gpb ~ kinhmo, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4055 0.2152 -1.884 0.0595 .
## kinhmo 0.4055 0.4776 0.849 0.3959
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.64 on 110 degrees of freedom
## AIC: 155.64
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_kinhmo), confint(model_kinhmo)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6666667 0.4339887 1.011951
## kinhmo 1.5000000 0.5836481 3.863890
round(exp(cbind(OR = coef(model_kinhmo), confint(model_kinhmo))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.67 0.43 1.01
## kinhmo 1.50 0.58 3.86
model_hang<- glm(gpb ~ hang, data = endo, family = binomial)
summary(model_hang)
##
## Call:
## glm(formula = gpb ~ hang, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.1787 0.1998 -0.894 0.3711
## hang -2.1239 1.0675 -1.990 0.0466 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 145.91 on 110 degrees of freedom
## AIC: 149.91
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_hang), confint(model_hang)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.8363636 0.563353289 1.2360059
## hang 0.1195652 0.006395857 0.6589616
round(exp(cbind(OR = coef(model_hang), confint(model_hang))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.84 0.56 1.24
## hang 0.12 0.01 0.66
model_not<- glm(gpb ~ notmo, data = endo, family = binomial)
summary(model_not)
##
## Call:
## glm(formula = gpb ~ notmo, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.02299 0.21444 -0.107 0.91462
## notmo -1.63524 0.58617 -2.790 0.00528 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 142.58 on 110 degrees of freedom
## AIC: 146.58
##
## Number of Fisher Scoring iterations: 3
exp(cbind(OR = coef(model_not), confint(model_not)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.9772727 0.64071284 1.4896095
## notmo 0.1949059 0.05350379 0.5625771
round(exp(cbind(OR = coef(model_not), confint(model_not))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.98 0.64 1.49
## notmo 0.19 0.05 0.56
model_dam<- glm(gpb ~ dam, data = endo, family = binomial)
summary(model_dam)
##
## Call:
## glm(formula = gpb ~ dam, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -17.57 1097.25 -0.016 0.987
## dam 17.46 1097.25 0.016 0.987
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 136.99 on 110 degrees of freedom
## AIC: 140.99
##
## Number of Fisher Scoring iterations: 16
exp(cbind(OR = coef(model_dam), confint(model_dam)))
## Waiting for profiling to be done...
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## OR 2.5 % 97.5 %
## (Intercept) 2.350463e-08 NA 2.149555e+25
## dam 3.845396e+07 5.337581e-26 NA
round(exp(cbind(OR = coef(model_dam), confint(model_dam))), 2)
## Waiting for profiling to be done...
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## OR 2.5 % 97.5 %
## (Intercept) 0 NA 2.149555e+25
## dam 38453964 0 NA
model_dongdac<- glm(gpb ~ dongdac, data = endo, family = binomial)
summary(model_dongdac)
##
## Call:
## glm(formula = gpb ~ dongdac, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2412 0.2326 -1.037 0.300
## dongdac -0.2553 0.4111 -0.621 0.535
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.97 on 110 degrees of freedom
## AIC: 155.97
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_dongdac), confint(model_dongdac)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7857143 0.4949633 1.236862
## dongdac 0.7747036 0.3408552 1.722175
round(exp(cbind(OR = coef(model_dongdac), confint(model_dongdac))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.79 0.49 1.24
## dongdac 0.77 0.34 1.72
model_xep<- glm(gpb ~ xep, data = endo, family = binomial)
summary(model_xep)
##
## Call:
## glm(formula = gpb ~ xep, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3618 0.2086 -1.735 0.0828 .
## xep 0.2440 0.5288 0.461 0.6445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.15 on 110 degrees of freedom
## AIC: 156.15
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_xep), confint(model_xep)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6964286 0.4597732 1.044375
## xep 1.2763533 0.4431627 3.624573
round(exp(cbind(OR = coef(model_xep), confint(model_xep))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.70 0.46 1.04
## xep 1.28 0.44 3.62
model_tdmp<- glm(gpb ~ tdmp, data = endo, family = binomial)
summary(model_tdmp)
##
## Call:
## glm(formula = gpb ~ tdmp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.31237 0.24026 -1.300 0.194
## tdmp -0.03247 0.39776 -0.082 0.935
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.35 on 110 degrees of freedom
## AIC: 156.35
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_tdmp), confint(model_tdmp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7317073 0.4532818 1.167612
## tdmp 0.9680556 0.4402941 2.107184
round(exp(cbind(OR = coef(model_tdmp), confint(model_tdmp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.73 0.45 1.17
## tdmp 0.97 0.44 2.11
model_trenp<- glm(gpb ~ trenp, data = endo, family = binomial)
summary(model_trenp)
##
## Call:
## glm(formula = gpb ~ trenp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 9.079e-16 2.540e-01 0.000 1.0000
## trenp -7.538e-01 3.955e-01 -1.906 0.0567 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.64 on 110 degrees of freedom
## AIC: 152.64
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_trenp), confint(model_trenp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 1.0000000 0.6062772 1.649410
## trenp 0.4705882 0.2133973 1.011924
round(exp(cbind(OR = coef(model_trenp), confint(model_trenp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 1.00 0.61 1.65
## trenp 0.47 0.21 1.01
model_giuap<- glm(gpb ~ giuap, data = endo, family = binomial)
summary(model_giuap)
##
## Call:
## glm(formula = gpb ~ giuap, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2603 0.2188 -1.190 0.234
## giuap -0.2703 0.4546 -0.595 0.552
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.00 on 110 degrees of freedom
## AIC: 156
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_giuap), confint(model_giuap)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7708333 0.4992166 1.180773
## giuap 0.7631161 0.3045972 1.837337
round(exp(cbind(OR = coef(model_giuap), confint(model_giuap))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.77 0.5 1.18
## giuap 0.76 0.3 1.84
model_duoip<- glm(gpb ~ duoip, data = endo, family = binomial)
summary(model_duoip)
##
## Call:
## glm(formula = gpb ~ duoip, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.33647 0.20702 -1.625 0.104
## duoip 0.08516 0.54482 0.156 0.876
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.34 on 110 degrees of freedom
## AIC: 156.34
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_duoip), confint(model_duoip)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7142857 0.4732014 1.068325
## duoip 1.0888889 0.3618393 3.164729
round(exp(cbind(OR = coef(model_duoip), confint(model_duoip))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.71 0.47 1.07
## duoip 1.09 0.36 3.16
model_trent<- glm(gpb ~ trent, data = endo, family = binomial)
summary(model_trent)
##
## Call:
## glm(formula = gpb ~ trent, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.6162 0.2388 -2.580 0.00988 **
## trent 0.9039 0.4168 2.169 0.03011 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 147.57 on 110 degrees of freedom
## AIC: 151.57
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_trent), confint(model_trent)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.540000 0.3337168 0.8548153
## trent 2.469136 1.0984522 5.6716543
round(exp(cbind(OR = coef(model_trent), confint(model_trent))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.54 0.33 0.85
## trent 2.47 1.10 5.67
model_duoit<- glm(gpb ~ duoit, data = endo, family = binomial)
summary(model_duoit)
##
## Call:
## glm(formula = gpb ~ duoit, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2683 0.2127 -1.261 0.207
## duoit -0.2914 0.4916 -0.593 0.553
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.00 on 110 degrees of freedom
## AIC: 156
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_duoit), confint(model_duoit)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7647059 0.5012773 1.157540
## duoit 0.7472527 0.2742059 1.925474
round(exp(cbind(OR = coef(model_duoit), confint(model_duoit))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.76 0.50 1.16
## duoit 0.75 0.27 1.93
model_nho3<- glm(gpb ~ nho3, data = endo, family = binomial)
summary(model_nho3)
##
## Call:
## glm(formula = gpb ~ nho3, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.1032 0.2033 -0.507 0.6118
## nho3 -2.5359 1.0549 -2.404 0.0162 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 141.56 on 110 degrees of freedom
## AIC: 145.56
##
## Number of Fisher Scoring iterations: 5
exp(cbind(OR = coef(model_nho3), confint(model_nho3)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.90196078 0.603854483 1.3435419
## nho3 0.07919255 0.004286555 0.4176047
round(exp(cbind(OR = coef(model_nho3), confint(model_nho3))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.90 0.6 1.34
## nho3 0.08 0.0 0.42
model_tu35<- glm(gpb ~ tu35, data = endo, family = binomial)
summary(model_tu35)
##
## Call:
## glm(formula = gpb ~ tu35, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2719 0.2346 -1.159 0.246
## tu35 -0.1555 0.4065 -0.383 0.702
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.21 on 110 degrees of freedom
## AIC: 156.21
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_tu35), confint(model_tu35)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7619048 0.4777436 1.203486
## tu35 0.8559783 0.3811861 1.889732
round(exp(cbind(OR = coef(model_tu35), confint(model_tu35))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.76 0.48 1.20
## tu35 0.86 0.38 1.89
model_tu57<- glm(gpb ~ tu57, data = endo, family = binomial)
summary(model_tu57)
##
## Call:
## glm(formula = gpb ~ tu57, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5550 0.2253 -2.463 0.0138 *
## tu57 0.9297 0.4519 2.057 0.0396 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.03 on 110 degrees of freedom
## AIC: 152.03
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_tu57), confint(model_tu57)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.5740741 0.3651868 0.8866109
## tu57 2.5337243 1.0550522 6.2840871
round(exp(cbind(OR = coef(model_tu57), confint(model_tu57))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.57 0.37 0.89
## tu57 2.53 1.06 6.28
model_lon7<- glm(gpb ~ lon7, data = endo, family = binomial)
summary(model_lon7)
##
## Call:
## glm(formula = gpb ~ lon7, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4162 0.2314 -1.799 0.0721 .
## lon7 0.2984 0.4142 0.720 0.4713
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.84 on 110 degrees of freedom
## AIC: 155.84
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_lon7), confint(model_lon7)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6595745 0.4153202 1.032756
## lon7 1.3476703 0.5953726 3.044675
round(exp(cbind(OR = coef(model_lon7), confint(model_lon7))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.66 0.42 1.03
## lon7 1.35 0.60 3.04
#endo$bo3 <- factor(endo$bo, levels = c(1, 2, 3), labels = c("tron_deu", "da_cung", "tua_gai"))
#model_bo <- glm(gpb ~ bo3, data = endo, family = binomial)
#summary(model_bo)
# Tạo biến mới bo4 từ biến bo
endo$bo4 <- factor(endo$bo, levels = c(1, 2, 3), labels = c(0, 1, 2))
model_bo4 <- glm(gpb ~ bo4, data = endo, family = binomial)
summary(model_bo4)
##
## Call:
## glm(formula = gpb ~ bo4, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -2.079 1.061 -1.961 0.0499 *
## bo41 1.224 1.099 1.113 0.2657
## bo42 2.614 1.104 2.368 0.0179 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 136.35 on 109 degrees of freedom
## AIC: 142.35
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_bo4), confint(model_bo4)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.12500 0.00673773 0.6811608
## bo41 3.40000 0.55928321 65.5966765
## bo42 13.64706 2.23042956 264.6792138
round(exp(cbind(OR = coef(model_bo4), confint(model_bo4))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.13 0.01 0.68
## bo41 3.40 0.56 65.60
## bo42 13.65 2.23 264.68
model_hach <- glm(gpb ~ hach, data = endo, family = binomial)
summary(model_hach)
##
## Call:
## glm(formula = gpb ~ hach, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.6690 0.2683 -2.493 0.0127 *
## hach 0.7491 0.3900 1.921 0.0548 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.62 on 110 degrees of freedom
## AIC: 152.62
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_hach), confint(model_hach)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.5121951 0.2972647 0.8564644
## hach 2.1150794 0.9903033 4.5915887
round(exp(cbind(OR = coef(model_hach), confint(model_hach))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.51 0.30 0.86
## hach 2.12 0.99 4.59
model_khongxl <- glm(gpb ~ khongxl, data = endo, family = binomial)
summary(model_khongxl)
##
## Call:
## glm(formula = gpb ~ khongxl, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4388 0.2420 -1.813 0.0698 .
## khongxl 0.1733 0.2264 0.766 0.4439
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.70 on 110 degrees of freedom
## AIC: 155.7
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_khongxl), confint(model_khongxl)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6448394 0.3886304 1.023727
## khongxl 1.1892611 0.7809518 2.097184
round(exp(cbind(OR = coef(model_khongxl), confint(model_khongxl))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.64 0.39 1.02
## khongxl 1.19 0.78 2.10
model_xlmp <- glm(gpb ~ xlmp, data = endo, family = binomial)
summary(model_xlmp)
##
## Call:
## glm(formula = gpb ~ xlmp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4824 0.2170 -2.223 0.0262 *
## xlmp 0.6711 0.4650 1.443 0.1490
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.70 on 110 degrees of freedom
## AIC: 152.7
##
## Number of Fisher Scoring iterations: 5
exp(cbind(OR = coef(model_xlmp), confint(model_xlmp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6172776 0.3993547 0.9357971
## xlmp 1.9563917 0.9893853 5.0799756
round(exp(cbind(OR = coef(model_xlmp), confint(model_xlmp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.62 0.40 0.94
## xlmp 1.96 0.99 5.08
model_xltn <- glm(gpb ~ xltn, data = endo, family = binomial)
summary(model_xltn)
##
## Call:
## glm(formula = gpb ~ xltn, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3759 0.1980 -1.898 0.0576 .
## xltn 0.3031 0.3350 0.905 0.3655
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.02 on 110 degrees of freedom
## AIC: 155.02
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_xltn), confint(model_xltn)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.6866852 0.4625382 1.008162
## xltn 1.3541058 0.8337309 3.608472
round(exp(cbind(OR = coef(model_xltn), confint(model_xltn))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.69 0.46 1.01
## xltn 1.35 0.83 3.61
model_xltt <- glm(gpb ~ xltt, data = endo, family = binomial)
summary(model_xltt)
##
## Call:
## glm(formula = gpb ~ xltt, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5363 0.2261 -2.372 0.0177 *
## xltt 0.8240 0.4438 1.857 0.0634 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.86 on 110 degrees of freedom
## AIC: 152.86
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_xltt), confint(model_xltt)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.5849057 0.3715905 0.9049289
## xltt 2.2795699 0.9612471 5.5401937
round(exp(cbind(OR = coef(model_xltt), confint(model_xltt))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.58 0.37 0.90
## xltt 2.28 0.96 5.54
model_carina <- glm(gpb ~ carina, data = endo, family = binomial)
summary(model_carina)
##
## Call:
## glm(formula = gpb ~ carina, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.32047 0.19583 -1.636 0.102
## carina -0.08499 0.93364 -0.091 0.927
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.35 on 110 degrees of freedom
## AIC: 156.35
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_carina), confint(model_carina)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7258065 0.4919310 1.062506
## carina 0.9185185 0.1173659 5.760180
round(exp(cbind(OR = coef(model_carina), confint(model_carina))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.73 0.49 1.06
## carina 0.92 0.12 5.76
model_gocp <- glm(gpb ~ gocp, data = endo, family = binomial)
summary(model_gocp)
##
## Call:
## glm(formula = gpb ~ gocp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2992 0.2012 -1.487 0.137
## gocp -0.2604 0.6583 -0.396 0.692
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.20 on 110 degrees of freedom
## AIC: 156.2
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_gocp), confint(model_gocp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7413793 0.4971663 1.097025
## gocp 0.7707641 0.1918181 2.719771
round(exp(cbind(OR = coef(model_gocp), confint(model_gocp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.74 0.50 1.10
## gocp 0.77 0.19 2.72
model_goct <- glm(gpb ~ goct, data = endo, family = binomial)
summary(model_goct)
##
## Call:
## glm(formula = gpb ~ goct, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.4308 0.2057 -2.094 0.0362 *
## goct 0.9008 0.6061 1.486 0.1372
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 150.08 on 110 degrees of freedom
## AIC: 154.08
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_goct), confint(model_goct)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.650000 0.4312382 0.9684814
## goct 2.461538 0.7651779 8.6625483
round(exp(cbind(OR = coef(model_goct), confint(model_goct))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.65 0.43 0.97
## goct 2.46 0.77 8.66
model_pqtp<- glm(gpb ~ pqtp, data = endo, family = binomial)
summary(model_pqtp)
##
## Call:
## glm(formula = gpb ~ pqtp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.1942 0.2552 -0.761 0.447
## pqtp -0.2954 0.3873 -0.763 0.446
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.78 on 110 degrees of freedom
## AIC: 155.78
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqtp), confint(model_pqtp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.8235294 0.4960729 1.356066
## pqtp 0.7442396 0.3454620 1.585137
round(exp(cbind(OR = coef(model_pqtp), confint(model_pqtp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.82 0.50 1.36
## pqtp 0.74 0.35 1.59
model_pqgp <- glm(gpb ~ pqgp, data = endo, family = binomial)
summary(model_pqgp)
##
## Call:
## glm(formula = gpb ~ pqgp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2822 0.1953 -1.445 0.148
## pqgp -1.1041 1.1350 -0.973 0.331
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 151.23 on 110 degrees of freedom
## AIC: 155.23
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqgp), confint(model_pqgp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7540984 0.51191942 1.103230
## pqgp 0.3315217 0.01664777 2.333705
round(exp(cbind(OR = coef(model_pqgp), confint(model_pqgp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.75 0.51 1.10
## pqgp 0.33 0.02 2.33
model_pqtg <- glm(gpb ~ pqtg, data = endo, family = binomial)
summary(model_pqtg)
##
## Call:
## glm(formula = gpb ~ pqtg, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2814 0.2094 -1.344 0.179
## pqtg -0.2576 0.5197 -0.496 0.620
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.11 on 110 degrees of freedom
## AIC: 156.11
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqtg), confint(model_pqtg)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7547170 0.4979142 1.134969
## pqtg 0.7729167 0.2664775 2.101419
round(exp(cbind(OR = coef(model_pqtg), confint(model_pqtg))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.75 0.50 1.13
## pqtg 0.77 0.27 2.10
model_pqdp <- glm(gpb ~ pqdp, data = endo, family = binomial)
summary(model_pqdp)
##
## Call:
## glm(formula = gpb ~ pqdp, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.31178 0.20554 -1.517 0.129
## pqdp -0.09369 0.56571 -0.166 0.868
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.33 on 110 degrees of freedom
## AIC: 156.33
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqdp), confint(model_pqdp)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7321429 0.4866450 1.092260
## pqdp 0.9105691 0.2855027 2.726727
round(exp(cbind(OR = coef(model_pqdp), confint(model_pqdp))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.73 0.49 1.09
## pqdp 0.91 0.29 2.73
model_pqtt <- glm(gpb ~ pqtt, data = endo, family = binomial)
summary(model_pqtt)
##
## Call:
## glm(formula = gpb ~ pqtt, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.5550 0.2253 -2.463 0.0138 *
## pqtt 0.9297 0.4519 2.057 0.0396 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.03 on 110 degrees of freedom
## AIC: 152.03
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqtt), confint(model_pqtt)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.5740741 0.3651868 0.8866109
## pqtt 2.5337243 1.0550522 6.2840871
round(exp(cbind(OR = coef(model_pqtt), confint(model_pqtt))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.57 0.37 0.89
## pqtt 2.53 1.06 6.28
model_pqdt <- glm(gpb ~ pqdt, data = endo, family = binomial)
summary(model_pqdt)
##
## Call:
## glm(formula = gpb ~ pqdt, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.1782 0.2117 -0.842 0.400
## pqdt -0.8026 0.5234 -1.533 0.125
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 149.84 on 110 degrees of freedom
## AIC: 153.84
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_pqdt), confint(model_pqdt)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.8367347 0.5503773 1.265574
## pqdt 0.4481707 0.1493645 1.199370
round(exp(cbind(OR = coef(model_pqdt), confint(model_pqdt))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.84 0.55 1.27
## pqdt 0.45 0.15 1.20
model_xhuyet <- glm(gpb ~ xhuyet, data = endo, family = binomial)
summary(model_xhuyet)
##
## Call:
## glm(formula = gpb ~ xhuyet, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2948 0.2233 -1.320 0.187
## xhuyet -0.1107 0.4344 -0.255 0.799
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 152.29 on 110 degrees of freedom
## AIC: 156.29
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_xhuyet), confint(model_xhuyet)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7446809 0.4776572 1.150117
## xhuyet 0.8952381 0.3752839 2.084181
round(exp(cbind(OR = coef(model_xhuyet), confint(model_xhuyet))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.74 0.48 1.15
## xhuyet 0.90 0.38 2.08
model_thamnhiem <- glm(gpb ~ thamnhiem, data = endo, family = binomial)
summary(model_thamnhiem)
##
## Call:
## glm(formula = gpb ~ thamnhiem, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.2877 0.3819 0.753 0.4513
## thamnhiem -0.8240 0.4438 -1.857 0.0634 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 148.86 on 110 degrees of freedom
## AIC: 152.86
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_thamnhiem), confint(model_thamnhiem)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 1.3333333 0.6337422 2.882175
## thamnhiem 0.4386792 0.1804991 1.040315
round(exp(cbind(OR = coef(model_thamnhiem), confint(model_thamnhiem))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 1.33 0.63 2.88
## thamnhiem 0.44 0.18 1.04
model_usui <- glm(gpb ~ usui, data = endo, family = binomial)
summary(model_usui)
##
## Call:
## glm(formula = gpb ~ usui, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.9280 0.2865 -3.239 0.00120 **
## usui 1.2381 0.4011 3.087 0.00202 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 142.38 on 110 degrees of freedom
## AIC: 146.38
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_usui), confint(model_usui)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.3953488 0.2195044 0.6801119
## usui 3.4491979 1.5916311 7.7102141
round(exp(cbind(OR = coef(model_usui), confint(model_usui))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.40 0.22 0.68
## usui 3.45 1.59 7.71
model_chenep <- glm(gpb ~ chenep, data = endo, family = binomial)
summary(model_chenep)
##
## Call:
## glm(formula = gpb ~ chenep, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.2412 0.2015 -1.197 0.231
## chenep -0.8575 0.6964 -1.231 0.218
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 150.68 on 110 degrees of freedom
## AIC: 154.68
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_chenep), confint(model_chenep)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.7857143 0.52706109 1.163980
## chenep 0.4242424 0.09011197 1.518971
round(exp(cbind(OR = coef(model_chenep), confint(model_chenep))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.79 0.53 1.16
## chenep 0.42 0.09 1.52
endo$sluong1 <- factor(endo$soluong, levels = c(1, 2, 3, 4, 5))
model_sluong <- glm(gpb ~ sluong1, data = endo, family = binomial)
summary(model_sluong)
##
## Call:
## glm(formula = gpb ~ sluong1, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.0986 1.1547 -0.951 0.341
## sluong12 1.1896 1.1935 0.997 0.319
## sluong13 0.3483 1.1916 0.292 0.770
## sluong14 1.5041 1.3229 1.137 0.256
## sluong15 -14.4675 1455.3980 -0.010 0.992
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 145.37 on 107 degrees of freedom
## AIC: 155.37
##
## Number of Fisher Scoring iterations: 14
exp(cbind(OR = coef(model_sluong), confint(model_sluong)))
## Waiting for profiling to be done...
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## OR 2.5 % 97.5 %
## (Intercept) 3.333333e-01 0.01648839 2.603547e+00
## sluong12 3.285714e+00 0.38664964 6.930233e+01
## sluong13 1.416667e+00 0.16710372 2.980370e+01
## sluong14 4.500000e+00 0.40389544 1.111026e+02
## sluong15 5.210312e-07 NA 1.902591e+102
round(exp(cbind(OR = coef(model_sluong), confint(model_sluong))), 2)
## Waiting for profiling to be done...
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## OR 2.5 % 97.5 %
## (Intercept) 0.33 0.02 2.600000e+00
## sluong12 3.29 0.39 6.930000e+01
## sluong13 1.42 0.17 2.980000e+01
## sluong14 4.50 0.40 1.111000e+02
## sluong15 0.00 NA 1.902591e+102
# Tạo biến mới vitri3
endo$vitri3 <- ifelse(endo$vtri == 1, 1, 0)
# Chuyển thành factor với nhãn rõ ràng
endo$vitri3 <- factor(endo$vitri3, levels = c(0, 1),
labels = c("Niêm mạc/dưới niêm", "Khối u"))
model_vtri <- glm(gpb ~ vitri3, data = endo, family = binomial)
summary(model_vtri)
##
## Call:
## glm(formula = gpb ~ vitri3, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.0116 0.2611 -3.874 0.000107 ***
## vitri3Khối u 2.0049 0.4530 4.426 9.62e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.36 on 111 degrees of freedom
## Residual deviance: 130.17 on 110 degrees of freedom
## AIC: 134.17
##
## Number of Fisher Scoring iterations: 4
exp(cbind(OR = coef(model_vtri), confint(model_vtri)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.3636364 0.2129098 0.5961077
## vitri3Khối u 7.4250000 3.1443429 18.7710236
round(exp(cbind(OR = coef(model_vtri), confint(model_vtri))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.36 0.21 0.60
## vitri3Khối u 7.42 3.14 18.77
#kiểm tra đa cộng tuyến
#install.packages("car")
library(car)
## Loading required package: carData
# Giả sử model đã xây dựng (các biến đã được chọn)
model_full <- glm(gpb ~ hutthuocla2 + chanan + daunguc + khangiong + khotho + tn + nt + hang + notmo + trent + nho3 + tu57 + bo4 + hach + xltt + pqtt + usui + vitri3, data = endo, family = binomial)
# Kiểm tra VIF
vif(model_full)
## GVIF Df GVIF^(1/(2*Df))
## hutthuocla2 1.640277 2 1.131695
## chanan 1.337289 1 1.156412
## daunguc 1.612730 1 1.269933
## khangiong 1.537050 1 1.239778
## khotho 1.638042 1 1.279860
## tn 1.739122 1 1.318758
## nt 1.344138 1 1.159370
## hang 1.304517 1 1.142155
## notmo 2.012868 1 1.418756
## trent 1.790647 1 1.338150
## nho3 1.842242 1 1.357292
## tu57 1.566737 1 1.251694
## bo4 1.522940 2 1.110889
## hach 1.346993 1 1.160600
## xltt 1.298729 1 1.139618
## pqtt 1.865048 1 1.365668
## usui 2.320516 1 1.523324
## vitri3 2.518990 1 1.587133
#Chạy đa biến tìm mô hình tốt nhất bằng phương pháp BMA
# Cài đặt gói BMA nếu chưa có
#install.packages("BMA")
library(BMA)
## Loading required package: survival
## Loading required package: leaps
## Loading required package: robustbase
##
## Attaching package: 'robustbase'
## The following object is masked from 'package:survival':
##
## heart
## Loading required package: inline
## Loading required package: rrcov
## Scalable Robust Estimators with High Breakdown Point (version 1.7-6)
# Danh sách biến cần chuyển
binary_vars <- c("chanan", "daunguc", "khangiong", "khotho",
"tn", "nt", "hang", "notmo", "trent",
"nho3", "tu57", "hach", "xltt", "pqtt", "usui")
# Duyệt qua từng biến và tạo biến mới có hậu tố "1" với kiểu factor
for (var in binary_vars) {
new_var <- paste0(var, "1")
endo[[new_var]] <- factor(endo[[var]], levels = c(0, 1), labels = c("Không", "Có"))
}
model_full <- glm(
gpb ~ hutthuocla2 + chanan1 + daunguc1 + khangiong1 + khotho1 +
tn1 + nt1 + hang1 + notmo1 + trent1 + nho31 + tu571 + bo4 +
hach1 + xltt1 + pqtt1 + usui1 + vitri3,
data = endo,
family = binomial
)
summary(model_full)
##
## Call:
## glm(formula = gpb ~ hutthuocla2 + chanan1 + daunguc1 + khangiong1 +
## khotho1 + tn1 + nt1 + hang1 + notmo1 + trent1 + nho31 + tu571 +
## bo4 + hach1 + xltt1 + pqtt1 + usui1 + vitri3, family = binomial,
## data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.69316 1.71253 -2.740 0.00613 **
## hutthuocla2co 0.98134 0.67217 1.460 0.14430
## hutthuocla2Ngung 0.79861 0.99868 0.800 0.42390
## chanan1Có 0.81907 0.77814 1.053 0.29252
## daunguc1Có 1.29053 0.68124 1.894 0.05817 .
## khangiong1Có 0.31627 1.46660 0.216 0.82926
## khotho1Có -0.03020 0.71084 -0.042 0.96611
## tn1Có 0.33568 0.73856 0.455 0.64946
## nt1Có -0.28689 0.69347 -0.414 0.67910
## hang1Có -3.02310 1.38142 -2.188 0.02864 *
## notmo1Có -1.45218 1.05720 -1.374 0.16956
## trent1Có 1.29730 0.76779 1.690 0.09110 .
## nho31Có -0.02214 1.53859 -0.014 0.98852
## tu571Có 1.80375 0.74400 2.424 0.01533 *
## bo41 1.29216 1.54612 0.836 0.40330
## bo42 2.14335 1.56289 1.371 0.17025
## hach1Có -0.09107 0.62260 -0.146 0.88370
## xltt1Có 0.33687 0.67160 0.502 0.61596
## pqtt1Có 0.49082 0.85489 0.574 0.56588
## usui1Có 0.36362 0.81719 0.445 0.65635
## vitri3Khối u 1.76904 0.88819 1.992 0.04640 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.360 on 111 degrees of freedom
## Residual deviance: 86.566 on 91 degrees of freedom
## AIC: 128.57
##
## Number of Fisher Scoring iterations: 6
model_step <- step(glm(gpb ~ 1, data = endo, family = binomial),
scope = formula(model_full), direction = "forward")
## Start: AIC=154.36
## gpb ~ 1
##
## Df Deviance AIC
## + vitri3 1 130.17 134.17
## + bo4 2 136.35 142.35
## + nho31 1 141.56 145.56
## + tn1 1 142.08 146.08
## + usui1 1 142.38 146.38
## + notmo1 1 142.58 146.58
## + hang1 1 145.91 149.91
## + chanan1 1 147.10 151.10
## + nt1 1 147.14 151.14
## + trent1 1 147.57 151.57
## + khangiong1 1 147.75 151.75
## + tu571 1 148.03 152.03
## + pqtt1 1 148.03 152.03
## + daunguc1 1 148.39 152.39
## + hach1 1 148.62 152.62
## + xltt1 1 148.86 152.86
## + hutthuocla2 2 146.95 152.95
## + khotho1 1 149.25 153.25
## <none> 152.36 154.36
##
## Step: AIC=134.17
## gpb ~ vitri3
##
## Df Deviance AIC
## + bo4 2 118.97 126.97
## + tn1 1 122.14 128.14
## + daunguc1 1 124.02 130.02
## + nho31 1 124.07 130.07
## + khangiong1 1 124.69 130.69
## + hang1 1 125.05 131.05
## + notmo1 1 125.24 131.24
## + chanan1 1 125.34 131.34
## + trent1 1 125.62 131.62
## + tu571 1 125.89 131.89
## + khotho1 1 126.71 132.71
## + hach1 1 127.40 133.40
## + pqtt1 1 127.54 133.54
## + xltt1 1 128.02 134.02
## + nt1 1 128.07 134.07
## <none> 130.17 134.17
## + hutthuocla2 2 127.91 135.91
## + usui1 1 130.06 136.06
##
## Step: AIC=126.97
## gpb ~ vitri3 + bo4
##
## Df Deviance AIC
## + hang1 1 113.64 123.64
## + daunguc1 1 114.02 124.02
## + trent1 1 114.47 124.47
## + nho31 1 114.56 124.56
## + notmo1 1 114.64 124.64
## + pqtt1 1 114.64 124.64
## + tn1 1 115.59 125.59
## + tu571 1 115.64 125.64
## + khangiong1 1 115.82 125.82
## + chanan1 1 116.39 126.39
## <none> 118.97 126.97
## + nt1 1 117.90 127.90
## + hach1 1 118.09 128.09
## + khotho1 1 118.32 128.32
## + xltt1 1 118.55 128.55
## + usui1 1 118.81 128.81
## + hutthuocla2 2 118.19 130.19
##
## Step: AIC=123.64
## gpb ~ vitri3 + bo4 + hang1
##
## Df Deviance AIC
## + trent1 1 108.37 120.37
## + daunguc1 1 109.13 121.13
## + pqtt1 1 109.46 121.46
## + tu571 1 109.69 121.69
## + notmo1 1 109.87 121.87
## + nho31 1 110.74 122.74
## + khangiong1 1 111.02 123.02
## + tn1 1 111.02 123.02
## + chanan1 1 111.55 123.55
## <none> 113.64 123.64
## + hach1 1 113.01 125.01
## + xltt1 1 113.05 125.05
## + nt1 1 113.19 125.19
## + khotho1 1 113.22 125.22
## + usui1 1 113.62 125.62
## + hutthuocla2 2 112.30 126.30
##
## Step: AIC=120.37
## gpb ~ vitri3 + bo4 + hang1 + trent1
##
## Df Deviance AIC
## + tu571 1 103.77 117.77
## + notmo1 1 104.44 118.44
## + daunguc1 1 104.57 118.57
## + nho31 1 104.91 118.91
## + tn1 1 105.57 119.57
## + khangiong1 1 106.23 120.23
## <none> 108.37 120.37
## + chanan1 1 106.69 120.69
## + nt1 1 107.30 121.30
## + hutthuocla2 2 105.45 121.45
## + pqtt1 1 107.54 121.54
## + xltt1 1 107.70 121.70
## + hach1 1 108.06 122.06
## + khotho1 1 108.30 122.30
## + usui1 1 108.31 122.31
##
## Step: AIC=117.77
## gpb ~ vitri3 + bo4 + hang1 + trent1 + tu571
##
## Df Deviance AIC
## + daunguc1 1 96.884 112.88
## + notmo1 1 100.605 116.61
## + tn1 1 100.793 116.79
## + khangiong1 1 100.888 116.89
## + nho31 1 101.143 117.14
## + chanan1 1 101.360 117.36
## <none> 103.773 117.77
## + hutthuocla2 2 100.164 118.16
## + xltt1 1 102.899 118.90
## + nt1 1 103.032 119.03
## + pqtt1 1 103.468 119.47
## + usui1 1 103.647 119.65
## + khotho1 1 103.705 119.70
## + hach1 1 103.739 119.74
##
## Step: AIC=112.88
## gpb ~ vitri3 + bo4 + hang1 + trent1 + tu571 + daunguc1
##
## Df Deviance AIC
## + notmo1 1 92.472 110.47
## + khangiong1 1 94.122 112.12
## <none> 96.884 112.88
## + nho31 1 95.079 113.08
## + chanan1 1 95.476 113.48
## + tn1 1 95.618 113.62
## + xltt1 1 95.909 113.91
## + hutthuocla2 2 94.302 114.30
## + nt1 1 96.530 114.53
## + pqtt1 1 96.633 114.63
## + hach1 1 96.771 114.77
## + usui1 1 96.875 114.88
## + khotho1 1 96.877 114.88
##
## Step: AIC=110.47
## gpb ~ vitri3 + bo4 + hang1 + trent1 + tu571 + daunguc1 + notmo1
##
## Df Deviance AIC
## <none> 92.472 110.47
## + khangiong1 1 90.677 110.68
## + xltt1 1 91.485 111.48
## + chanan1 1 91.560 111.56
## + hutthuocla2 2 89.593 111.59
## + nt1 1 91.632 111.63
## + tn1 1 91.741 111.74
## + pqtt1 1 92.256 112.26
## + hach1 1 92.391 112.39
## + usui1 1 92.450 112.45
## + khotho1 1 92.459 112.46
## + nho31 1 92.471 112.47
summary(model_step)
##
## Call:
## glm(formula = gpb ~ vitri3 + bo4 + hang1 + trent1 + tu571 + daunguc1 +
## notmo1, family = binomial, data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.1260 1.6646 -2.479 0.013189 *
## vitri3Khối u 2.2302 0.6030 3.698 0.000217 ***
## bo41 1.3822 1.5620 0.885 0.376197
## bo42 2.5665 1.5579 1.647 0.099483 .
## hang1Có -2.8869 1.2406 -2.327 0.019969 *
## trent1Có 1.2598 0.5664 2.224 0.026128 *
## tu571Có 1.6997 0.6697 2.538 0.011144 *
## daunguc1Có 1.6004 0.5973 2.679 0.007373 **
## notmo1Có -1.4862 0.7511 -1.979 0.047857 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.360 on 111 degrees of freedom
## Residual deviance: 92.472 on 103 degrees of freedom
## AIC: 110.47
##
## Number of Fisher Scoring iterations: 6
exp(cbind(OR = coef(model_step), confint(model_step)))
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.01614696 0.0003352793 0.2413562
## vitri3Khối u 9.30182347 3.0469962664 33.3400801
## bo41 3.98383224 0.2765159178 143.0774488
## bo42 13.02027842 0.9386734114 469.6978747
## hang1Có 0.05575063 0.0024455611 0.4672148
## trent1Có 3.52478440 1.1977447266 11.2849334
## tu571Có 5.47234928 1.5615518895 22.2435376
## daunguc1Có 4.95482353 1.6233911383 17.3614051
## notmo1Có 0.22623327 0.0457175759 0.9090765
round(exp(cbind(OR = coef(model_step), confint(model_step))), 2)
## Waiting for profiling to be done...
## OR 2.5 % 97.5 %
## (Intercept) 0.02 0.00 0.24
## vitri3Khối u 9.30 3.05 33.34
## bo41 3.98 0.28 143.08
## bo42 13.02 0.94 469.70
## hang1Có 0.06 0.00 0.47
## trent1Có 3.52 1.20 11.28
## tu571Có 5.47 1.56 22.24
## daunguc1Có 4.95 1.62 17.36
## notmo1Có 0.23 0.05 0.91
#Chạy mô hình bằng pp ENTER
model_enter <- glm(
gpb ~ hutthuocla2 + chanan1 + daunguc1 + khangiong1 + khotho1 +
tn1 + nt1 + hang1 + notmo1 + trent1 + nho31 + tu571 + bo4 +
hach1 + xltt1 + pqtt1 + usui1 + vitri3,
data = endo,
family = binomial
)
summary(model_enter)
##
## Call:
## glm(formula = gpb ~ hutthuocla2 + chanan1 + daunguc1 + khangiong1 +
## khotho1 + tn1 + nt1 + hang1 + notmo1 + trent1 + nho31 + tu571 +
## bo4 + hach1 + xltt1 + pqtt1 + usui1 + vitri3, family = binomial,
## data = endo)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.69316 1.71253 -2.740 0.00613 **
## hutthuocla2co 0.98134 0.67217 1.460 0.14430
## hutthuocla2Ngung 0.79861 0.99868 0.800 0.42390
## chanan1Có 0.81907 0.77814 1.053 0.29252
## daunguc1Có 1.29053 0.68124 1.894 0.05817 .
## khangiong1Có 0.31627 1.46660 0.216 0.82926
## khotho1Có -0.03020 0.71084 -0.042 0.96611
## tn1Có 0.33568 0.73856 0.455 0.64946
## nt1Có -0.28689 0.69347 -0.414 0.67910
## hang1Có -3.02310 1.38142 -2.188 0.02864 *
## notmo1Có -1.45218 1.05720 -1.374 0.16956
## trent1Có 1.29730 0.76779 1.690 0.09110 .
## nho31Có -0.02214 1.53859 -0.014 0.98852
## tu571Có 1.80375 0.74400 2.424 0.01533 *
## bo41 1.29216 1.54612 0.836 0.40330
## bo42 2.14335 1.56289 1.371 0.17025
## hach1Có -0.09107 0.62260 -0.146 0.88370
## xltt1Có 0.33687 0.67160 0.502 0.61596
## pqtt1Có 0.49082 0.85489 0.574 0.56588
## usui1Có 0.36362 0.81719 0.445 0.65635
## vitri3Khối u 1.76904 0.88819 1.992 0.04640 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 152.360 on 111 degrees of freedom
## Residual deviance: 86.566 on 91 degrees of freedom
## AIC: 128.57
##
## Number of Fisher Scoring iterations: 6