Kiểm định phân phối chuẩn và tạo biến mới (BMI phân độ) và (MAFLD
phân nhóm)
library(readxl)
mafld_mace <- read_excel("~/Desktop/Nghiên cứu của Duy/Nghiên cứu MAFLD - biến cố tim mạch/mafld_mace.xlsx")
View(mafld_mace)
head(mafld_mace)
## # A tibble: 6 × 58
## stt sex year age dtd sagbt sagm giatrinhm donhm doxh giatrixh cc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 0 1958 66 1 0 1 336 4 1 7.1 1.58
## 2 2 1 1974 50 1 1 0 189 1 2 7.9 1.62
## 3 3 1 1955 69 0 1 0 238 1 1 4.8 1.6
## 4 4 0 1936 88 1 0 1 302 4 3 12.1 1.48
## 5 5 0 1975 49 0 0 1 271 3 1 5.3 1.46
## 6 6 0 1953 71 0 1 0 224 1 2 9.2 1.5
## # ℹ 46 more variables: cn <dbl>, bmi <dbl>, eo <dbl>, mafld <dbl>, hbsag <dbl>,
## # antihcv <dbl>, cholestp <dbl>, trig <dbl>, hld <dbl>, ldl <dbl>,
## # nonhdl <dbl>, fli <dbl>, ldlhdl <dbl>, hdlnonhdl <dbl>, fib4 <dbl>,
## # glucose <dbl>, hba1c <dbl>, alt <dbl>, ast <dbl>, ggt <dbl>, ure <dbl>,
## # cre <dbl>, plt <dbl>, agaston <dbl>, multisteno <dbl>, ntbnp <dbl>,
## # auric <dbl>, canthiepct <dbl>, nmctc <dbl>, cdtnkod <dbl>, dqn <dbl>,
## # stc <dbl>, maceg <dbl>, toa_ucmc <chr>, toa_bb <chr>, toa_kkttc <chr>, …
# Chọn các biến số (numeric variables)
num_vars <- sapply(mafld_mace, is.numeric)
mafld_num <- mafld_mace[, num_vars]
# 1. Kiểm định Shapiro-Wilk cho từng biến
shapiro_results <- lapply(mafld_num, function(x) {
x <- x[!is.na(x)] # bỏ NA
if(length(x) >= 3 & length(x) <= 5000){ # Shapiro khuyến nghị
shapiro.test(x)
} else {
NA
}
})
# Xem kết quả Shapiro-Wilk
shapiro_results
## $stt
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.95469, p-value = 1.498e-09
##
##
## $sex
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.60548, p-value < 2.2e-16
##
##
## $year
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98104, p-value = 5.642e-05
##
##
## $age
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98104, p-value = 5.642e-05
##
##
## $dtd
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.58734, p-value < 2.2e-16
##
##
## $sagbt
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.6359, p-value < 2.2e-16
##
##
## $sagm
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.63597, p-value < 2.2e-16
##
##
## $giatrinhm
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.97337, p-value = 1.513e-06
##
##
## $donhm
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.77873, p-value < 2.2e-16
##
##
## $doxh
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.59055, p-value < 2.2e-16
##
##
## $giatrixh
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.89516, p-value = 1.141e-15
##
##
## $cc
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98542, p-value = 0.0006018
##
##
## $cn
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.9925, p-value = 0.04856
##
##
## $bmi
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.97816, p-value = 1.351e-05
##
##
## $eo
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98332, p-value = 0.0001874
##
##
## $mafld
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.63651, p-value < 2.2e-16
##
##
## $hbsag
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.27863, p-value < 2.2e-16
##
##
## $antihcv
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.16137, p-value < 2.2e-16
##
##
## $cholestp
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98859, p-value = 0.003978
##
##
## $trig
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.80795, p-value < 2.2e-16
##
##
## $hld
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.8901, p-value = 4.607e-16
##
##
## $ldl
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.9833, p-value = 0.0001851
##
##
## $nonhdl
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98771, p-value = 0.002323
##
##
## $fli
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98824, p-value = 0.03366
##
##
## $ldlhdl
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.98551, p-value = 0.000636
##
##
## $hdlnonhdl
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.87985, p-value < 2.2e-16
##
##
## $fib4
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.83017, p-value < 2.2e-16
##
##
## $glucose
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.71002, p-value < 2.2e-16
##
##
## $hba1c
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.80987, p-value < 2.2e-16
##
##
## $alt
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.81245, p-value < 2.2e-16
##
##
## $ast
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.83676, p-value < 2.2e-16
##
##
## $ggt
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.63383, p-value < 2.2e-16
##
##
## $ure
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.88828, p-value = 3.346e-16
##
##
## $cre
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.96603, p-value = 7.724e-08
##
##
## $plt
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.94906, p-value = 2.655e-10
##
##
## $agaston
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.73707, p-value < 2.2e-16
##
##
## $multisteno
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.63573, p-value < 2.2e-16
##
##
## $ntbnp
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.35099, p-value < 2.2e-16
##
##
## $auric
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.9919, p-value = 0.09193
##
##
## $canthiepct
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.60661, p-value < 2.2e-16
##
##
## $nmctc
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.087319, p-value < 2.2e-16
##
##
## $cdtnkod
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.17169, p-value < 2.2e-16
##
##
## $dqn
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.059862, p-value < 2.2e-16
##
##
## $stc
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.044226, p-value < 2.2e-16
##
##
## $maceg
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.59826, p-value < 2.2e-16
##
##
## $toa_trime
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.5813, p-value < 2.2e-16
##
##
## $toa_loitieu
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.41782, p-value < 2.2e-16
##
##
## $toa_metfor
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.44, p-value < 2.2e-16
##
##
## $toa_su
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.22088, p-value < 2.2e-16
##
##
## $toa_sglt2
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.27579, p-value < 2.2e-16
##
##
## $toa_dpp4
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.18905, p-value < 2.2e-16
##
##
## $toa_insulin
##
## Shapiro-Wilk normality test
##
## data: x
## W = 0.07411, p-value < 2.2e-16
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
# Tạo biến mới theo phân độ BMI châu Á
mafld_mace <- mafld_mace %>%
mutate(
bmi_phando = case_when(
bmi < 18.5 ~ "Thiếu cân",
bmi >= 18.5 & bmi < 23 ~ "Bình thường",
bmi >= 23 & bmi < 25 ~ "Thừa cân",
bmi >= 25 & bmi < 30 ~ "Béo phì độ I",
bmi >= 30 ~ "Béo phì độ II",
TRUE ~ NA_character_
)
)
# Kiểm tra kết quả
table(mafld_mace$bmi_phando, useNA = "ifany")
##
## Béo phì độ I Béo phì độ II Bình thường Thiếu cân Thừa cân
## 104 14 120 13 137
mafld_mace <- mafld_mace %>%
mutate(
mafld_sub = case_when(
mafld == 1 & dtd == 1 ~ 1,
mafld == 1 & dtd != 1 & bmi >= 23 ~ 2,
mafld == 1 & dtd != 1 & bmi < 23 ~ 3,
TRUE ~ NA_real_
)
)
head(mafld_mace)
## # A tibble: 6 × 60
## stt sex year age dtd sagbt sagm giatrinhm donhm doxh giatrixh cc
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 0 1958 66 1 0 1 336 4 1 7.1 1.58
## 2 2 1 1974 50 1 1 0 189 1 2 7.9 1.62
## 3 3 1 1955 69 0 1 0 238 1 1 4.8 1.6
## 4 4 0 1936 88 1 0 1 302 4 3 12.1 1.48
## 5 5 0 1975 49 0 0 1 271 3 1 5.3 1.46
## 6 6 0 1953 71 0 1 0 224 1 2 9.2 1.5
## # ℹ 48 more variables: cn <dbl>, bmi <dbl>, eo <dbl>, mafld <dbl>, hbsag <dbl>,
## # antihcv <dbl>, cholestp <dbl>, trig <dbl>, hld <dbl>, ldl <dbl>,
## # nonhdl <dbl>, fli <dbl>, ldlhdl <dbl>, hdlnonhdl <dbl>, fib4 <dbl>,
## # glucose <dbl>, hba1c <dbl>, alt <dbl>, ast <dbl>, ggt <dbl>, ure <dbl>,
## # cre <dbl>, plt <dbl>, agaston <dbl>, multisteno <dbl>, ntbnp <dbl>,
## # auric <dbl>, canthiepct <dbl>, nmctc <dbl>, cdtnkod <dbl>, dqn <dbl>,
## # stc <dbl>, maceg <dbl>, toa_ucmc <chr>, toa_bb <chr>, toa_kkttc <chr>, …
View(mafld_mace)
# Kiểm tra tần suất các nhóm
table(mafld_mace$mafld_sub, useNA = "ifany")
##
## 1 2 3 <NA>
## 77 99 17 195
mafld_mace <- mafld_mace %>%
mutate(
mace = if_else(
nmctc == 1 | cdtnkod == 1 | dqn == 1 | stc == 1,
1, 0
)
)
# Kiểm tra tần suất
table(mafld_mace$mace, useNA = "ifany")
##
## 0 1
## 367 21
Đặc điểm dân số nghiên cứu chung
library(dplyr)
library(gtsummary)
tbl1 <- mafld_mace %>%
select(
sex, age, dtd, toa_ucmc, toa_bb, toa_kkttc, toa_statin, toa_nitrate,
toa_trime, toa_ccb, toa_loitieu, toa_metfor, toa_su, toa_sglt2,
toa_dpp4, toa_insulin, sagbt, sagm, giatrinhm, donhm, doxh,
giatrixh, cc, cn, bmi, bmi_phando, eo, mafld, hbsag, antihcv, cholestp,
trig, hld, ldl, nonhdl, fli, ldlhdl, hdlnonhdl, fib4, glucose,
hba1c, alt, ast, ggt, ure, cre, plt, agaston, multisteno,
ntbnp, auric, canthiepct, nmctc, cdtnkod, dqn, stc, maceg, mace
) %>%
tbl_summary(
type = all_continuous() ~ "continuous2",
statistic = list(
all_continuous() ~ c("{mean} ({sd})", "{median} ({p25}, {p75})", "{min}, {max}"),
all_categorical() ~ "{n} / {N} ({p}%)"
),
digits = all_continuous() ~ 2,
label = list(
sex ~ "Giới tính",
age ~ "Tuổi",
dtd ~ "Đái tháo đường",
toa_ucmc ~ "Thuốc ức chế men chuyển",
toa_bb ~ "Thuốc chẹn beta",
toa_kkttc ~ "Thuốc kháng kết tập tiểu cầu",
toa_statin ~ "Statin",
toa_nitrate ~ "Nitrate",
toa_trime ~ "Trimetazidine",
toa_ccb ~ "Thuốc chẹn kênh canxi",
toa_loitieu ~ "Thuốc lợi tiểu",
toa_metfor ~ "Metformin",
toa_su ~ "Sulfonylurea",
toa_sglt2 ~ "SGLT2i",
toa_dpp4 ~ "DPP4i",
toa_insulin ~ "Insulin",
sagbt ~ "SAGBT",
sagm ~ "SAGM",
giatrinhm ~ "Giá trị nhiễm mỡ",
donhm ~ "Độ nhiễm mỡ",
doxh ~ "Độ xơ hóa",
giatrixh ~ "Giá trị xơ hóa",
cc ~ "Chiều cao",
cn ~ "Cân nặng",
bmi ~ "BMI",
bmi_phando ~ "Phân độ BMI",
eo ~ "Vòng eo",
mafld ~ "MAFLD",
hbsag ~ "HBsAg (+)",
antihcv ~ "Anti-HCV (+)",
cholestp ~ "Cholesterol toàn phần",
trig ~ "Triglyceride",
hld ~ "HDL-C",
ldl ~ "LDL-C",
nonhdl ~ "Non-HDL-C",
fli ~ "FLI",
ldlhdl ~ "Tỷ số LDL/HDL",
hdlnonhdl ~ "Tỷ số HDL/Non-HDL",
fib4 ~ "Chỉ số FIB-4",
glucose ~ "Glucose máu",
hba1c ~ "HbA1c",
alt ~ "ALT",
ast ~ "AST",
ggt ~ "GGT",
ure ~ "Ure",
cre ~ "Creatinin",
plt ~ "Tiểu cầu",
agaston ~ "Điểm vôi hóa (Agatston)",
multisteno ~ "Hẹp nhiều nhánh",
ntbnp ~ "NT-proBNP",
auric ~ "Acid uric máu",
canthiepct ~ "Can thiệp ĐMV",
nmctc ~ "Nhồi máu cơ tim cấp",
cdtnkod ~ "Đau thắt ngực không ổn định",
dqn ~ "Đột quỵ não",
stc ~ "Suy tim cấp",
maceg ~ "MACE mở rộng",
mace ~ "MACE"
),
missing_text = "(Missing)"
) %>%
modify_caption("**Đặc điểm dân số nghiên cứu**") %>%
bold_labels()
tbl1
Đặc điểm dân số nghiên cứu
| Characteristic |
N = 388 |
| Giới tính |
250 / 388 (64%) |
| Tuổi |
|
| Mean (SD) |
69.02 (9.23) |
| Median (IQR) |
70.00 (63.00, 75.00) |
| Range |
37.00, 88.00 |
| Đái tháo đường |
124 / 388 (32%) |
| Thuốc ức chế men chuyển |
|
| 0 |
147 / 388 (38%) |
| 1 |
241 / 388 (62%) |
| Thuốc chẹn beta |
|
| 0 |
155 / 388 (40%) |
| 1 |
233 / 388 (60%) |
| Thuốc kháng kết tập tiểu cầu |
|
| 0 |
102 / 388 (26%) |
| 1 |
286 / 388 (74%) |
| Statin |
|
| 0 |
82 / 388 (21%) |
| 1 |
306 / 388 (79%) |
| Nitrate |
|
| 0 |
295 / 388 (76%) |
| 1 |
93 / 388 (24%) |
| Trimetazidine |
120 / 388 (31%) |
| Thuốc chẹn kênh canxi |
|
| 0 |
284 / 388 (73%) |
| 1 |
104 / 388 (27%) |
| Thuốc lợi tiểu |
56 / 388 (14%) |
| Metformin |
62 / 388 (16%) |
| Sulfonylurea |
19 / 388 (4.9%) |
| SGLT2i |
27 / 388 (7.0%) |
| DPP4i |
15 / 388 (3.9%) |
| Insulin |
4 / 388 (1.0%) |
| SAGBT |
186 / 388 (48%) |
| SAGM |
186 / 387 (48%) |
| (Missing) |
1 |
| Giá trị nhiễm mỡ |
|
| Mean (SD) |
250.93 (38.27) |
| Median (IQR) |
245.50 (222.00, 279.25) |
| Range |
179.00, 354.00 |
| Độ nhiễm mỡ |
|
| 1 |
188 / 388 (48%) |
| 2 |
77 / 388 (20%) |
| 3 |
63 / 388 (16%) |
| 4 |
60 / 388 (15%) |
| Độ xơ hóa |
|
| 1 |
282 / 388 (73%) |
| 2 |
76 / 388 (20%) |
| 3 |
22 / 388 (5.7%) |
| 4 |
8 / 388 (2.1%) |
| Giá trị xơ hóa |
|
| Mean (SD) |
6.55 (1.99) |
| Median (IQR) |
6.10 (5.20, 7.40) |
| Range |
2.50, 16.90 |
| Chiều cao |
|
| Mean (SD) |
1.61 (0.07) |
| Median (IQR) |
1.60 (1.55, 1.66) |
| Range |
1.45, 1.80 |
| Cân nặng |
|
| Mean (SD) |
62.08 (9.37) |
| Median (IQR) |
62.00 (56.00, 68.00) |
| Range |
37.00, 95.00 |
| BMI |
|
| Mean (SD) |
23.99 (3.05) |
| Median (IQR) |
23.88 (22.22, 25.63) |
| Range |
15.06, 35.16 |
| Phân độ BMI |
|
| Béo phì độ I |
104 / 388 (27%) |
| Béo phì độ II |
14 / 388 (3.6%) |
| Bình thường |
120 / 388 (31%) |
| Thiếu cân |
13 / 388 (3.4%) |
| Thừa cân |
137 / 388 (35%) |
| Vòng eo |
|
| Mean (SD) |
89.85 (7.89) |
| Median (IQR) |
90.00 (85.00, 94.00) |
| Range |
63.00, 119.00 |
| MAFLD |
193 / 388 (50%) |
| HBsAg (+) |
14 / 198 (7.1%) |
| (Missing) |
190 |
| Anti-HCV (+) |
6 / 197 (3.0%) |
| (Missing) |
191 |
| Cholesterol toàn phần |
|
| Mean (SD) |
5.53 (1.35) |
| Median (IQR) |
5.60 (4.60, 6.40) |
| Range |
2.10, 11.80 |
| Triglyceride |
|
| Mean (SD) |
2.21 (1.31) |
| Median (IQR) |
1.90 (1.30, 2.70) |
| Range |
0.50, 13.00 |
| HDL-C |
|
| Mean (SD) |
1.23 (0.28) |
| Median (IQR) |
1.20 (1.00, 1.40) |
| Range |
0.70, 3.60 |
| LDL-C |
|
| Mean (SD) |
3.36 (1.19) |
| Median (IQR) |
3.31 (2.48, 4.18) |
| Range |
0.77, 9.45 |
| Non-HDL-C |
|
| Mean (SD) |
4.31 (1.27) |
| Median (IQR) |
4.30 (3.50, 5.10) |
| Range |
1.30, 10.40 |
| FLI |
|
| Mean (SD) |
47.54 (21.54) |
| Median (IQR) |
46.87 (31.38, 62.86) |
| Range |
3.72, 98.08 |
| (Missing) |
130 |
| Tỷ số LDL/HDL |
|
| Mean (SD) |
2.80 (1.00) |
| Median (IQR) |
2.76 (2.07, 3.50) |
| Range |
0.75, 6.75 |
| Tỷ số HDL/Non-HDL |
|
| Mean (SD) |
0.31 (0.12) |
| Median (IQR) |
0.28 (0.23, 0.36) |
| Range |
0.13, 0.86 |
| Chỉ số FIB-4 |
|
| Mean (SD) |
1.80 (0.87) |
| Median (IQR) |
1.61 (1.27, 2.14) |
| Range |
0.07, 7.90 |
| (Missing) |
1 |
| Glucose máu |
|
| Mean (SD) |
6.50 (2.25) |
| Median (IQR) |
5.90 (5.20, 6.80) |
| Range |
3.90, 20.50 |
| HbA1c |
|
| Mean (SD) |
6.48 (1.27) |
| Median (IQR) |
6.05 (5.70, 6.90) |
| Range |
4.10, 13.40 |
| (Missing) |
94 |
| ALT |
|
| Mean (SD) |
28.61 (16.94) |
| Median (IQR) |
23.00 (18.00, 34.00) |
| Range |
6.00, 113.00 |
| (Missing) |
1 |
| AST |
|
| Mean (SD) |
28.16 (10.37) |
| Median (IQR) |
26.00 (22.00, 31.00) |
| Range |
2.50, 87.20 |
| (Missing) |
1 |
| GGT |
|
| Mean (SD) |
49.54 (43.38) |
| Median (IQR) |
38.50 (25.00, 57.00) |
| Range |
6.30, 421.00 |
| (Missing) |
130 |
| Ure |
|
| Mean (SD) |
5.60 (1.77) |
| Median (IQR) |
5.30 (4.40, 6.40) |
| Range |
2.30, 19.10 |
| Creatinin |
|
| Mean (SD) |
89.03 (19.59) |
| Median (IQR) |
88.00 (75.93, 100.00) |
| Range |
46.30, 182.00 |
| Tiểu cầu |
|
| Mean (SD) |
229.68 (60.66) |
| Median (IQR) |
221.00 (189.00, 263.25) |
| Range |
96.00, 561.00 |
| Điểm vôi hóa (Agatston) |
|
| Mean (SD) |
364.51 (461.86) |
| Median (IQR) |
188.91 (63.17, 485.14) |
| Range |
0.00, 2,893.28 |
| (Missing) |
64 |
| Hẹp nhiều nhánh |
203 / 388 (52%) |
| NT-proBNP |
|
| Mean (SD) |
499.27 (1,421.86) |
| Median (IQR) |
98.25 (42.56, 232.38) |
| Range |
5.00, 10,005.00 |
| (Missing) |
218 |
| Acid uric máu |
|
| Mean (SD) |
408.20 (96.73) |
| Median (IQR) |
410.00 (340.50, 469.50) |
| Range |
161.00, 742.60 |
| (Missing) |
81 |
| Can thiệp ĐMV |
139 / 388 (36%) |
| Nhồi máu cơ tim cấp |
5 / 388 (1.3%) |
| Đau thắt ngực không ổn định |
13 / 388 (3.4%) |
| Đột quỵ não |
3 / 388 (0.8%) |
| Suy tim cấp |
2 / 388 (0.5%) |
| MACE mở rộng |
132 / 388 (34%) |
| MACE |
21 / 388 (5.4%) |
Đặc điểm dân số nghiên cứu ở hai nhóm MACE - Không tính can thiệp
chương trình
tbl2 <- mafld_mace %>%
select(
sex, age, dtd, toa_ucmc, toa_bb, toa_kkttc, toa_statin, toa_nitrate,
toa_trime, toa_ccb, toa_loitieu, toa_metfor, toa_su, toa_sglt2,
toa_dpp4, toa_insulin, sagbt, sagm, giatrinhm, donhm, doxh,
giatrixh, cc, cn, bmi, bmi_phando, eo, mafld, mafld_sub, hbsag, antihcv, cholestp,
trig, hld, ldl, nonhdl, fli, ldlhdl, hdlnonhdl, fib4, glucose,
hba1c, alt, ast, ggt, ure, cre, plt, agaston, multisteno,
ntbnp, auric, mace
) %>%
tbl_summary(
by = mace,
type = all_continuous() ~ "continuous2",
statistic = list(
all_continuous() ~ c("{mean} ({sd})", "{median} ({p25}, {p75})", "{min}, {max}"),
all_categorical() ~ "{n} / {N} ({p}%)"
),
digits = all_continuous() ~ 2,
label = list(
sex ~ "Giới tính",
age ~ "Tuổi",
dtd ~ "Đái tháo đường",
toa_ucmc ~ "Thuốc ức chế men chuyển",
toa_bb ~ "Thuốc chẹn beta",
toa_kkttc ~ "Thuốc kháng kết tập tiểu cầu",
toa_statin ~ "Statin",
toa_nitrate ~ "Nitrate",
toa_trime ~ "Trimetazidine",
toa_ccb ~ "Thuốc chẹn kênh canxi",
toa_loitieu ~ "Thuốc lợi tiểu",
toa_metfor ~ "Metformin",
toa_su ~ "Sulfonylurea",
toa_sglt2 ~ "SGLT2i",
toa_dpp4 ~ "DPP4i",
toa_insulin ~ "Insulin",
sagbt ~ "SAGBT",
sagm ~ "SAGM",
giatrinhm ~ "Giá trị HM",
donhm ~ "Đơn HM",
doxh ~ "Độ xơ hóa",
giatrixh ~ "Giá trị xơ hóa",
cc ~ "Chiều cao",
cn ~ "Cân nặng",
bmi ~ "BMI",
bmi_phando ~ "Phân độ BMI",
eo ~ "Vòng eo",
mafld ~ "MAFLD",
mafld_sub ~ "Phân nhóm MAFLD",
hbsag ~ "HBsAg (+)",
antihcv ~ "Anti-HCV (+)",
cholestp ~ "Cholesterol toàn phần",
trig ~ "Triglyceride",
hld ~ "HDL-C",
ldl ~ "LDL-C",
nonhdl ~ "Non-HDL-C",
fli ~ "FLI",
ldlhdl ~ "Tỷ số LDL/HDL",
hdlnonhdl ~ "Tỷ số HDL/Non-HDL",
fib4 ~ "Chỉ số FIB-4",
glucose ~ "Glucose máu",
hba1c ~ "HbA1c",
alt ~ "ALT",
ast ~ "AST",
ggt ~ "GGT",
ure ~ "Ure",
cre ~ "Creatinin",
plt ~ "Tiểu cầu",
agaston ~ "Điểm vôi hóa (Agatston)",
multisteno ~ "Hẹp nhiều nhánh",
ntbnp ~ "NT-proBNP",
auric ~ "Acid uric máu",
missing_text = "(Missing)"
)) %>%
add_p(pvalue_fun = ~ style_pvalue(.x, digits = 3)) %>%
add_overall() %>%
add_n() %>%
modify_caption("**Đặc điểm dân số nghiên cứu**") %>%
bold_labels()
tbl2
Đặc điểm dân số nghiên cứu
| Characteristic |
N |
Overall, N = 388 |
0, N = 367 |
1, N = 21 |
p-value |
| Giới tính |
388 |
250 / 388 (64%) |
233 / 367 (63%) |
17 / 21 (81%) |
0.104 |
| Tuổi |
388 |
|
|
|
0.653 |
| Mean (SD) |
|
69.02 (9.23) |
69.11 (9.08) |
67.57 (11.78) |
|
| Median (IQR) |
|
70.00 (63.00, 75.00) |
70.00 (63.00, 75.00) |
70.00 (62.00, 75.00) |
|
| Range |
|
37.00, 88.00 |
37.00, 88.00 |
43.00, 85.00 |
|
| Đái tháo đường |
388 |
124 / 388 (32%) |
116 / 367 (32%) |
8 / 21 (38%) |
0.535 |
| Thuốc ức chế men chuyển |
388 |
|
|
|
0.344 |
| 0 |
|
147 / 388 (38%) |
137 / 367 (37%) |
10 / 21 (48%) |
|
| 1 |
|
241 / 388 (62%) |
230 / 367 (63%) |
11 / 21 (52%) |
|
| Thuốc chẹn beta |
388 |
|
|
|
0.035 |
| 0 |
|
155 / 388 (40%) |
142 / 367 (39%) |
13 / 21 (62%) |
|
| 1 |
|
233 / 388 (60%) |
225 / 367 (61%) |
8 / 21 (38%) |
|
| Thuốc kháng kết tập tiểu cầu |
388 |
|
|
|
0.076 |
| 0 |
|
102 / 388 (26%) |
93 / 367 (25%) |
9 / 21 (43%) |
|
| 1 |
|
286 / 388 (74%) |
274 / 367 (75%) |
12 / 21 (57%) |
|
| Statin |
388 |
|
|
|
0.001 |
| 0 |
|
82 / 388 (21%) |
71 / 367 (19%) |
11 / 21 (52%) |
|
| 1 |
|
306 / 388 (79%) |
296 / 367 (81%) |
10 / 21 (48%) |
|
| Nitrate |
388 |
|
|
|
0.285 |
| 0 |
|
295 / 388 (76%) |
277 / 367 (75%) |
18 / 21 (86%) |
|
| 1 |
|
93 / 388 (24%) |
90 / 367 (25%) |
3 / 21 (14%) |
|
| Trimetazidine |
388 |
120 / 388 (31%) |
118 / 367 (32%) |
2 / 21 (9.5%) |
0.029 |
| Thuốc chẹn kênh canxi |
388 |
|
|
|
0.409 |
| 0 |
|
284 / 388 (73%) |
267 / 367 (73%) |
17 / 21 (81%) |
|
| 1 |
|
104 / 388 (27%) |
100 / 367 (27%) |
4 / 21 (19%) |
|
| Thuốc lợi tiểu |
388 |
56 / 388 (14%) |
53 / 367 (14%) |
3 / 21 (14%) |
>0.999 |
| Metformin |
388 |
62 / 388 (16%) |
57 / 367 (16%) |
5 / 21 (24%) |
0.354 |
| Sulfonylurea |
388 |
19 / 388 (4.9%) |
18 / 367 (4.9%) |
1 / 21 (4.8%) |
>0.999 |
| SGLT2i |
388 |
27 / 388 (7.0%) |
25 / 367 (6.8%) |
2 / 21 (9.5%) |
0.649 |
| DPP4i |
388 |
15 / 388 (3.9%) |
14 / 367 (3.8%) |
1 / 21 (4.8%) |
0.573 |
| Insulin |
388 |
4 / 388 (1.0%) |
4 / 367 (1.1%) |
0 / 21 (0%) |
>0.999 |
| SAGBT |
388 |
186 / 388 (48%) |
177 / 367 (48%) |
9 / 21 (43%) |
0.632 |
| SAGM |
387 |
186 / 387 (48%) |
175 / 366 (48%) |
11 / 21 (52%) |
0.684 |
| Unknown |
|
1 |
1 |
0 |
|
| Giá trị HM |
388 |
|
|
|
0.944 |
| Mean (SD) |
|
250.93 (38.27) |
251.04 (38.41) |
249.14 (36.48) |
|
| Median (IQR) |
|
245.50 (222.00, 279.25) |
245.00 (222.00, 279.50) |
248.00 (222.00, 274.00) |
|
| Range |
|
179.00, 354.00 |
179.00, 354.00 |
185.00, 313.00 |
|
| Đơn HM |
388 |
|
|
|
0.337 |
| 1 |
|
188 / 388 (48%) |
180 / 367 (49%) |
8 / 21 (38%) |
|
| 2 |
|
77 / 388 (20%) |
70 / 367 (19%) |
7 / 21 (33%) |
|
| 3 |
|
63 / 388 (16%) |
61 / 367 (17%) |
2 / 21 (9.5%) |
|
| 4 |
|
60 / 388 (15%) |
56 / 367 (15%) |
4 / 21 (19%) |
|
| Độ xơ hóa |
388 |
|
|
|
0.717 |
| 1 |
|
282 / 388 (73%) |
264 / 367 (72%) |
18 / 21 (86%) |
|
| 2 |
|
76 / 388 (20%) |
73 / 367 (20%) |
3 / 21 (14%) |
|
| 3 |
|
22 / 388 (5.7%) |
22 / 367 (6.0%) |
0 / 21 (0%) |
|
| 4 |
|
8 / 388 (2.1%) |
8 / 367 (2.2%) |
0 / 21 (0%) |
|
| Giá trị xơ hóa |
388 |
|
|
|
0.138 |
| Mean (SD) |
|
6.55 (1.99) |
6.59 (2.02) |
5.85 (1.16) |
|
| Median (IQR) |
|
6.10 (5.20, 7.40) |
6.10 (5.30, 7.40) |
5.70 (5.10, 6.50) |
|
| Range |
|
2.50, 16.90 |
2.50, 16.90 |
3.90, 8.30 |
|
| Chiều cao |
388 |
|
|
|
0.176 |
| Mean (SD) |
|
1.61 (0.07) |
1.61 (0.07) |
1.62 (0.06) |
|
| Median (IQR) |
|
1.60 (1.55, 1.66) |
1.60 (1.55, 1.66) |
1.63 (1.60, 1.67) |
|
| Range |
|
1.45, 1.80 |
1.45, 1.80 |
1.50, 1.70 |
|
| Cân nặng |
388 |
|
|
|
0.822 |
| Mean (SD) |
|
62.08 (9.37) |
62.02 (9.40) |
63.05 (9.00) |
|
| Median (IQR) |
|
62.00 (56.00, 68.00) |
62.00 (56.00, 68.00) |
62.00 (59.00, 67.00) |
|
| Range |
|
37.00, 95.00 |
37.00, 95.00 |
50.00, 85.00 |
|
| BMI |
388 |
|
|
|
0.414 |
| Mean (SD) |
|
23.99 (3.05) |
24.00 (3.04) |
23.89 (3.29) |
|
| Median (IQR) |
|
23.88 (22.22, 25.63) |
23.88 (22.27, 25.74) |
23.88 (22.15, 24.44) |
|
| Range |
|
15.06, 35.16 |
15.06, 35.16 |
18.82, 31.99 |
|
| Phân độ BMI |
388 |
|
|
|
0.048 |
| Béo phì độ I |
|
104 / 388 (27%) |
103 / 367 (28%) |
1 / 21 (4.8%) |
|
| Béo phì độ II |
|
14 / 388 (3.6%) |
12 / 367 (3.3%) |
2 / 21 (9.5%) |
|
| Bình thường |
|
120 / 388 (31%) |
111 / 367 (30%) |
9 / 21 (43%) |
|
| Thiếu cân |
|
13 / 388 (3.4%) |
13 / 367 (3.5%) |
0 / 21 (0%) |
|
| Thừa cân |
|
137 / 388 (35%) |
128 / 367 (35%) |
9 / 21 (43%) |
|
| Vòng eo |
388 |
|
|
|
0.713 |
| Mean (SD) |
|
89.85 (7.89) |
89.79 (7.79) |
90.90 (9.61) |
|
| Median (IQR) |
|
90.00 (85.00, 94.00) |
90.00 (85.00, 94.00) |
88.00 (86.00, 92.00) |
|
| Range |
|
63.00, 119.00 |
63.00, 112.00 |
79.00, 119.00 |
|
| MAFLD |
388 |
193 / 388 (50%) |
180 / 367 (49%) |
13 / 21 (62%) |
0.252 |
| Phân nhóm MAFLD |
193 |
|
|
|
0.909 |
| 1 |
|
77 / 193 (40%) |
71 / 180 (39%) |
6 / 13 (46%) |
|
| 2 |
|
99 / 193 (51%) |
93 / 180 (52%) |
6 / 13 (46%) |
|
| 3 |
|
17 / 193 (8.8%) |
16 / 180 (8.9%) |
1 / 13 (7.7%) |
|
| Unknown |
|
195 |
187 |
8 |
|
| HBsAg (+) |
198 |
14 / 198 (7.1%) |
13 / 186 (7.0%) |
1 / 12 (8.3%) |
0.596 |
| Unknown |
|
190 |
181 |
9 |
|
| Anti-HCV (+) |
197 |
6 / 197 (3.0%) |
6 / 186 (3.2%) |
0 / 11 (0%) |
>0.999 |
| Unknown |
|
191 |
181 |
10 |
|
| Cholesterol toàn phần |
388 |
|
|
|
0.285 |
| Mean (SD) |
|
5.53 (1.35) |
5.51 (1.35) |
5.78 (1.32) |
|
| Median (IQR) |
|
5.60 (4.60, 6.40) |
5.60 (4.60, 6.30) |
5.90 (5.20, 6.70) |
|
| Range |
|
2.10, 11.80 |
2.10, 11.80 |
3.10, 8.60 |
|
| Triglyceride |
388 |
|
|
|
0.307 |
| Mean (SD) |
|
2.21 (1.31) |
2.20 (1.33) |
2.34 (1.07) |
|
| Median (IQR) |
|
1.90 (1.30, 2.70) |
1.90 (1.30, 2.70) |
2.15 (1.60, 3.30) |
|
| Range |
|
0.50, 13.00 |
0.50, 13.00 |
0.90, 4.60 |
|
| HDL-C |
388 |
|
|
|
0.569 |
| Mean (SD) |
|
1.23 (0.28) |
1.23 (0.28) |
1.20 (0.29) |
|
| Median (IQR) |
|
1.20 (1.00, 1.40) |
1.20 (1.00, 1.40) |
1.20 (1.00, 1.30) |
|
| Range |
|
0.70, 3.60 |
0.70, 3.60 |
0.72, 2.00 |
|
| LDL-C |
388 |
|
|
|
0.514 |
| Mean (SD) |
|
3.36 (1.19) |
3.36 (1.20) |
3.46 (1.10) |
|
| Median (IQR) |
|
3.31 (2.48, 4.18) |
3.30 (2.48, 4.14) |
3.70 (2.70, 4.28) |
|
| Range |
|
0.77, 9.45 |
0.77, 9.45 |
1.33, 5.51 |
|
| Non-HDL-C |
388 |
|
|
|
0.220 |
| Mean (SD) |
|
4.31 (1.27) |
4.29 (1.28) |
4.58 (1.16) |
|
| Median (IQR) |
|
4.30 (3.50, 5.10) |
4.30 (3.44, 5.10) |
4.70 (4.11, 5.10) |
|
| Range |
|
1.30, 10.40 |
1.30, 10.40 |
2.10, 7.01 |
|
| FLI |
258 |
|
|
|
0.721 |
| Mean (SD) |
|
47.54 (21.54) |
47.63 (21.70) |
45.30 (17.86) |
|
| Median (IQR) |
|
46.87 (31.38, 62.86) |
47.02 (31.56, 62.86) |
39.88 (31.53, 61.67) |
|
| Range |
|
3.72, 98.08 |
3.72, 98.08 |
24.27, 70.32 |
|
| Unknown |
|
130 |
119 |
11 |
|
| Tỷ số LDL/HDL |
388 |
|
|
|
0.524 |
| Mean (SD) |
|
2.80 (1.00) |
2.80 (1.01) |
2.89 (0.77) |
|
| Median (IQR) |
|
2.76 (2.07, 3.50) |
2.75 (2.05, 3.50) |
3.02 (2.43, 3.47) |
|
| Range |
|
0.75, 6.75 |
0.75, 6.75 |
1.33, 4.11 |
|
| Tỷ số HDL/Non-HDL |
388 |
|
|
|
0.228 |
| Mean (SD) |
|
0.31 (0.12) |
0.31 (0.12) |
0.27 (0.08) |
|
| Median (IQR) |
|
0.28 (0.23, 0.36) |
0.29 (0.23, 0.37) |
0.27 (0.22, 0.33) |
|
| Range |
|
0.13, 0.86 |
0.13, 0.86 |
0.17, 0.48 |
|
| Chỉ số FIB-4 |
387 |
|
|
|
0.088 |
| Mean (SD) |
|
1.80 (0.87) |
1.82 (0.89) |
1.52 (0.60) |
|
| Median (IQR) |
|
1.61 (1.27, 2.14) |
1.61 (1.28, 2.15) |
1.42 (1.09, 1.74) |
|
| Range |
|
0.07, 7.90 |
0.07, 7.90 |
0.77, 3.24 |
|
| Unknown |
|
1 |
1 |
0 |
|
| Glucose máu |
388 |
|
|
|
0.734 |
| Mean (SD) |
|
6.50 (2.25) |
6.50 (2.28) |
6.41 (1.75) |
|
| Median (IQR) |
|
5.90 (5.20, 6.80) |
5.90 (5.20, 6.75) |
5.80 (5.40, 7.30) |
|
| Range |
|
3.90, 20.50 |
3.90, 20.50 |
4.00, 11.70 |
|
| HbA1c |
294 |
|
|
|
0.018 |
| Mean (SD) |
|
6.48 (1.27) |
6.45 (1.27) |
7.11 (1.06) |
|
| Median (IQR) |
|
6.05 (5.70, 6.90) |
6.00 (5.70, 6.85) |
7.20 (6.15, 7.60) |
|
| Range |
|
4.10, 13.40 |
4.10, 13.40 |
5.60, 9.00 |
|
| Unknown |
|
94 |
84 |
10 |
|
| ALT |
387 |
|
|
|
0.127 |
| Mean (SD) |
|
28.61 (16.94) |
28.78 (16.77) |
25.66 (19.84) |
|
| Median (IQR) |
|
23.00 (18.00, 34.00) |
23.40 (18.00, 35.00) |
22.00 (14.00, 31.00) |
|
| Range |
|
6.00, 113.00 |
6.00, 113.00 |
10.00, 99.00 |
|
| Unknown |
|
1 |
1 |
0 |
|
| AST |
387 |
|
|
|
0.135 |
| Mean (SD) |
|
28.16 (10.37) |
28.36 (10.53) |
24.78 (6.24) |
|
| Median (IQR) |
|
26.00 (22.00, 31.00) |
26.00 (22.00, 31.00) |
24.40 (21.00, 28.00) |
|
| Range |
|
2.50, 87.20 |
2.50, 87.20 |
15.00, 41.00 |
|
| Unknown |
|
1 |
1 |
0 |
|
| GGT |
258 |
|
|
|
0.318 |
| Mean (SD) |
|
49.54 (43.38) |
50.08 (44.03) |
36.05 (17.78) |
|
| Median (IQR) |
|
38.50 (25.00, 57.00) |
39.00 (25.75, 57.85) |
30.00 (20.50, 51.00) |
|
| Range |
|
6.30, 421.00 |
6.30, 421.00 |
18.00, 68.00 |
|
| Unknown |
|
130 |
119 |
11 |
|
| Ure |
388 |
|
|
|
0.692 |
| Mean (SD) |
|
5.60 (1.77) |
5.59 (1.73) |
5.61 (2.43) |
|
| Median (IQR) |
|
5.30 (4.40, 6.40) |
5.30 (4.50, 6.40) |
4.90 (3.90, 7.30) |
|
| Range |
|
2.30, 19.10 |
2.30, 19.10 |
2.50, 11.30 |
|
| Creatinin |
388 |
|
|
|
0.436 |
| Mean (SD) |
|
89.03 (19.59) |
88.77 (19.08) |
93.48 (27.31) |
|
| Median (IQR) |
|
88.00 (75.93, 100.00) |
88.00 (75.35, 100.00) |
90.00 (85.00, 104.00) |
|
| Range |
|
46.30, 182.00 |
46.30, 176.00 |
51.00, 182.00 |
|
| Tiểu cầu |
388 |
|
|
|
0.121 |
| Mean (SD) |
|
229.68 (60.66) |
228.60 (60.67) |
248.43 (58.68) |
|
| Median (IQR) |
|
221.00 (189.00, 263.25) |
220.00 (188.00, 260.50) |
255.00 (202.00, 268.00) |
|
| Range |
|
96.00, 561.00 |
96.00, 561.00 |
174.00, 415.00 |
|
| Điểm vôi hóa (Agatston) |
324 |
|
|
|
0.156 |
| Mean (SD) |
|
364.51 (461.86) |
354.50 (448.99) |
604.07 (684.82) |
|
| Median (IQR) |
|
188.91 (63.17, 485.14) |
182.45 (61.80, 472.69) |
277.40 (174.18, 896.23) |
|
| Range |
|
0.00, 2,893.28 |
0.00, 2,893.28 |
4.41, 2,183.94 |
|
| Unknown |
|
64 |
56 |
8 |
|
| Hẹp nhiều nhánh |
388 |
203 / 388 (52%) |
189 / 367 (51%) |
14 / 21 (67%) |
0.176 |
| NT-proBNP |
170 |
|
|
|
0.858 |
| Mean (SD) |
|
499.27 (1,421.86) |
456.59 (1,353.34) |
1,061.18 (2,132.75) |
|
| Median (IQR) |
|
98.25 (42.56, 232.38) |
98.25 (42.56, 230.05) |
78.43 (46.85, 448.95) |
|
| Range |
|
5.00, 10,005.00 |
5.00, 10,005.00 |
17.50, 5,808.00 |
|
| Unknown |
|
218 |
209 |
9 |
|
| Acid uric máu |
307 |
|
|
|
0.240 |
| Mean (SD) |
|
408.20 (96.73) |
406.98 (96.55) |
433.69 (100.64) |
|
| Median (IQR) |
|
410.00 (340.50, 469.50) |
409.00 (340.00, 468.20) |
461.50 (375.25, 497.00) |
|
| Range |
|
161.00, 742.60 |
161.00, 742.60 |
259.00, 601.30 |
|
| Unknown |
|
81 |
74 |
7 |
|
Đặc điểm dân số nghiên cứu giữa hai nhóm MACE mở rộng - Bao gồm mace
và can thiệp mạch vành chương trình
tbl3 <- mafld_mace %>%
select(
sex, age, dtd, toa_ucmc, toa_bb, toa_kkttc, toa_statin, toa_nitrate,
toa_trime, toa_ccb, toa_loitieu, toa_metfor, toa_su, toa_sglt2,
toa_dpp4, toa_insulin, sagbt, sagm, giatrinhm, donhm, doxh,
giatrixh, cc, cn, bmi, bmi_phando, eo, mafld, mafld_sub, hbsag, antihcv, cholestp,
trig, hld, ldl, nonhdl, fli, ldlhdl, hdlnonhdl, fib4, glucose,
hba1c, alt, ast, ggt, ure, cre, plt, agaston, multisteno,
ntbnp, auric, maceg
) %>%
tbl_summary(
by = maceg,
type = all_continuous() ~ "continuous2",
statistic = list(
all_continuous() ~ c("{mean} ({sd})", "{median} ({p25}, {p75})", "{min}, {max}"),
all_categorical() ~ "{n} / {N} ({p}%)"
),
digits = all_continuous() ~ 2,
label = list(
sex ~ "Giới tính",
age ~ "Tuổi",
dtd ~ "Đái tháo đường",
toa_ucmc ~ "Thuốc ức chế men chuyển",
toa_bb ~ "Thuốc chẹn beta",
toa_kkttc ~ "Thuốc kháng kết tập tiểu cầu",
toa_statin ~ "Statin",
toa_nitrate ~ "Nitrate",
toa_trime ~ "Trimetazidine",
toa_ccb ~ "Thuốc chẹn kênh canxi",
toa_loitieu ~ "Thuốc lợi tiểu",
toa_metfor ~ "Metformin",
toa_su ~ "Sulfonylurea",
toa_sglt2 ~ "SGLT2i",
toa_dpp4 ~ "DPP4i",
toa_insulin ~ "Insulin",
sagbt ~ "Siêu âm gan bình thường",
sagm ~ "Siêu âm gan nhiễm mỡ",
giatrinhm ~ "Giá trị nhiễm mỡ",
donhm ~ "Độ nhiễm mỡ",
doxh ~ "Độ xơ hóa",
giatrixh ~ "Giá trị xơ hóa",
cc ~ "Chiều cao",
cn ~ "Cân nặng",
bmi ~ "BMI",
bmi_phando ~ "Phân độ BMI",
eo ~ "Vòng eo",
mafld ~ "MAFLD",
mafld_sub ~ "Phân nhóm MAFLD",
hbsag ~ "HBsAg (+)",
antihcv ~ "Anti-HCV (+)",
cholestp ~ "Cholesterol toàn phần",
trig ~ "Triglyceride",
hld ~ "HDL-C",
ldl ~ "LDL-C",
nonhdl ~ "Non-HDL-C",
fli ~ "FLI",
ldlhdl ~ "Tỷ số LDL/HDL",
hdlnonhdl ~ "Tỷ số HDL/Non-HDL",
fib4 ~ "Chỉ số FIB-4",
glucose ~ "Glucose máu",
hba1c ~ "HbA1c",
alt ~ "ALT",
ast ~ "AST",
ggt ~ "GGT",
ure ~ "Ure",
cre ~ "Creatinin",
plt ~ "Tiểu cầu",
agaston ~ "Điểm vôi hóa (Agatston)",
multisteno ~ "Hẹp nhiều nhánh",
ntbnp ~ "NT-proBNP",
auric ~ "Acid uric máu",
missing_text = "(Missing)"
)) %>%
add_p(pvalue_fun = ~ style_pvalue(.x, digits = 3)) %>%
add_overall() %>%
add_n() %>%
modify_caption("**Đặc điểm dân số nghiên cứu**") %>%
bold_labels()
tbl3
Đặc điểm dân số nghiên cứu
| Characteristic |
N |
Overall, N = 388 |
0, N = 256 |
1, N = 132 |
p-value |
| Giới tính |
388 |
250 / 388 (64%) |
159 / 256 (62%) |
91 / 132 (69%) |
0.183 |
| Tuổi |
388 |
|
|
|
0.295 |
| Mean (SD) |
|
69.02 (9.23) |
69.29 (9.56) |
68.51 (8.58) |
|
| Median (IQR) |
|
70.00 (63.00, 75.00) |
70.00 (63.75, 75.00) |
69.50 (62.00, 74.00) |
|
| Range |
|
37.00, 88.00 |
37.00, 88.00 |
43.00, 86.00 |
|
| Đái tháo đường |
388 |
124 / 388 (32%) |
84 / 256 (33%) |
40 / 132 (30%) |
0.616 |
| Thuốc ức chế men chuyển |
388 |
|
|
|
0.378 |
| 0 |
|
147 / 388 (38%) |
93 / 256 (36%) |
54 / 132 (41%) |
|
| 1 |
|
241 / 388 (62%) |
163 / 256 (64%) |
78 / 132 (59%) |
|
| Thuốc chẹn beta |
388 |
|
|
|
0.014 |
| 0 |
|
155 / 388 (40%) |
91 / 256 (36%) |
64 / 132 (48%) |
|
| 1 |
|
233 / 388 (60%) |
165 / 256 (64%) |
68 / 132 (52%) |
|
| Thuốc kháng kết tập tiểu cầu |
388 |
|
|
|
0.006 |
| 0 |
|
102 / 388 (26%) |
56 / 256 (22%) |
46 / 132 (35%) |
|
| 1 |
|
286 / 388 (74%) |
200 / 256 (78%) |
86 / 132 (65%) |
|
| Statin |
388 |
|
|
|
<0.001 |
| 0 |
|
82 / 388 (21%) |
39 / 256 (15%) |
43 / 132 (33%) |
|
| 1 |
|
306 / 388 (79%) |
217 / 256 (85%) |
89 / 132 (67%) |
|
| Nitrate |
388 |
|
|
|
0.873 |
| 0 |
|
295 / 388 (76%) |
194 / 256 (76%) |
101 / 132 (77%) |
|
| 1 |
|
93 / 388 (24%) |
62 / 256 (24%) |
31 / 132 (23%) |
|
| Trimetazidine |
388 |
120 / 388 (31%) |
83 / 256 (32%) |
37 / 132 (28%) |
0.375 |
| Thuốc chẹn kênh canxi |
388 |
|
|
|
0.413 |
| 0 |
|
284 / 388 (73%) |
184 / 256 (72%) |
100 / 132 (76%) |
|
| 1 |
|
104 / 388 (27%) |
72 / 256 (28%) |
32 / 132 (24%) |
|
| Thuốc lợi tiểu |
388 |
56 / 388 (14%) |
33 / 256 (13%) |
23 / 132 (17%) |
0.229 |
| Metformin |
388 |
62 / 388 (16%) |
42 / 256 (16%) |
20 / 132 (15%) |
0.749 |
| Sulfonylurea |
388 |
19 / 388 (4.9%) |
15 / 256 (5.9%) |
4 / 132 (3.0%) |
0.221 |
| SGLT2i |
388 |
27 / 388 (7.0%) |
18 / 256 (7.0%) |
9 / 132 (6.8%) |
0.938 |
| DPP4i |
388 |
15 / 388 (3.9%) |
13 / 256 (5.1%) |
2 / 132 (1.5%) |
0.085 |
| Insulin |
388 |
4 / 388 (1.0%) |
1 / 256 (0.4%) |
3 / 132 (2.3%) |
0.116 |
| Siêu âm gan bình thường |
388 |
186 / 388 (48%) |
135 / 256 (53%) |
51 / 132 (39%) |
0.008 |
| Siêu âm gan nhiễm mỡ |
387 |
186 / 387 (48%) |
112 / 255 (44%) |
74 / 132 (56%) |
0.023 |
| Unknown |
|
1 |
1 |
0 |
|
| Giá trị nhiễm mỡ |
388 |
|
|
|
0.325 |
| Mean (SD) |
|
250.93 (38.27) |
250.21 (39.48) |
252.34 (35.91) |
|
| Median (IQR) |
|
245.50 (222.00, 279.25) |
239.00 (220.75, 278.25) |
250.50 (223.50, 280.25) |
|
| Range |
|
179.00, 354.00 |
179.00, 354.00 |
182.00, 331.00 |
|
| Độ nhiễm mỡ |
388 |
|
|
|
0.002 |
| 1 |
|
188 / 388 (48%) |
139 / 256 (54%) |
49 / 132 (37%) |
|
| 2 |
|
77 / 388 (20%) |
38 / 256 (15%) |
39 / 132 (30%) |
|
| 3 |
|
63 / 388 (16%) |
39 / 256 (15%) |
24 / 132 (18%) |
|
| 4 |
|
60 / 388 (15%) |
40 / 256 (16%) |
20 / 132 (15%) |
|
| Độ xơ hóa |
388 |
|
|
|
0.291 |
| 1 |
|
282 / 388 (73%) |
193 / 256 (75%) |
89 / 132 (67%) |
|
| 2 |
|
76 / 388 (20%) |
44 / 256 (17%) |
32 / 132 (24%) |
|
| 3 |
|
22 / 388 (5.7%) |
13 / 256 (5.1%) |
9 / 132 (6.8%) |
|
| 4 |
|
8 / 388 (2.1%) |
6 / 256 (2.3%) |
2 / 132 (1.5%) |
|
| Giá trị xơ hóa |
388 |
|
|
|
0.370 |
| Mean (SD) |
|
6.55 (1.99) |
6.51 (2.02) |
6.62 (1.93) |
|
| Median (IQR) |
|
6.10 (5.20, 7.40) |
6.10 (5.30, 7.20) |
6.20 (5.10, 7.60) |
|
| Range |
|
2.50, 16.90 |
3.60, 16.90 |
2.50, 13.80 |
|
| Chiều cao |
388 |
|
|
|
0.046 |
| Mean (SD) |
|
1.61 (0.07) |
1.60 (0.07) |
1.62 (0.07) |
|
| Median (IQR) |
|
1.60 (1.55, 1.66) |
1.60 (1.55, 1.65) |
1.62 (1.58, 1.66) |
|
| Range |
|
1.45, 1.80 |
1.45, 1.80 |
1.45, 1.76 |
|
| Cân nặng |
388 |
|
|
|
0.020 |
| Mean (SD) |
|
62.08 (9.37) |
61.40 (9.87) |
63.40 (8.19) |
|
| Median (IQR) |
|
62.00 (56.00, 68.00) |
61.00 (55.00, 67.00) |
63.00 (59.00, 69.25) |
|
| Range |
|
37.00, 95.00 |
37.00, 95.00 |
43.00, 85.00 |
|
| BMI |
388 |
|
|
|
0.357 |
| Mean (SD) |
|
23.99 (3.05) |
23.87 (3.15) |
24.24 (2.84) |
|
| Median (IQR) |
|
23.88 (22.22, 25.63) |
23.88 (22.22, 25.53) |
24.06 (22.26, 25.82) |
|
| Range |
|
15.06, 35.16 |
15.06, 35.16 |
17.58, 33.78 |
|
| Phân độ BMI |
388 |
|
|
|
0.354 |
| Béo phì độ I |
|
104 / 388 (27%) |
67 / 256 (26%) |
37 / 132 (28%) |
|
| Béo phì độ II |
|
14 / 388 (3.6%) |
9 / 256 (3.5%) |
5 / 132 (3.8%) |
|
| Bình thường |
|
120 / 388 (31%) |
78 / 256 (30%) |
42 / 132 (32%) |
|
| Thiếu cân |
|
13 / 388 (3.4%) |
12 / 256 (4.7%) |
1 / 132 (0.8%) |
|
| Thừa cân |
|
137 / 388 (35%) |
90 / 256 (35%) |
47 / 132 (36%) |
|
| Vòng eo |
388 |
|
|
|
0.251 |
| Mean (SD) |
|
89.85 (7.89) |
89.40 (8.32) |
90.72 (6.90) |
|
| Median (IQR) |
|
90.00 (85.00, 94.00) |
90.00 (84.00, 94.00) |
90.00 (87.00, 94.00) |
|
| Range |
|
63.00, 119.00 |
63.00, 112.00 |
76.00, 119.00 |
|
| MAFLD |
388 |
193 / 388 (50%) |
112 / 256 (44%) |
81 / 132 (61%) |
0.001 |
| Phân nhóm MAFLD |
193 |
|
|
|
0.567 |
| 1 |
|
77 / 193 (40%) |
47 / 112 (42%) |
30 / 81 (37%) |
|
| 2 |
|
99 / 193 (51%) |
57 / 112 (51%) |
42 / 81 (52%) |
|
| 3 |
|
17 / 193 (8.8%) |
8 / 112 (7.1%) |
9 / 81 (11%) |
|
| Unknown |
|
195 |
144 |
51 |
|
| HBsAg (+) |
198 |
14 / 198 (7.1%) |
7 / 126 (5.6%) |
7 / 72 (9.7%) |
0.271 |
| Unknown |
|
190 |
130 |
60 |
|
| Anti-HCV (+) |
197 |
6 / 197 (3.0%) |
4 / 127 (3.1%) |
2 / 70 (2.9%) |
>0.999 |
| Unknown |
|
191 |
129 |
62 |
|
| Cholesterol toàn phần |
388 |
|
|
|
0.359 |
| Mean (SD) |
|
5.53 (1.35) |
5.47 (1.39) |
5.64 (1.26) |
|
| Median (IQR) |
|
5.60 (4.60, 6.40) |
5.55 (4.50, 6.33) |
5.65 (4.78, 6.40) |
|
| Range |
|
2.10, 11.80 |
2.10, 11.80 |
2.90, 9.00 |
|
| Triglyceride |
388 |
|
|
|
0.096 |
| Mean (SD) |
|
2.21 (1.31) |
2.16 (1.36) |
2.29 (1.21) |
|
| Median (IQR) |
|
1.90 (1.30, 2.70) |
1.80 (1.30, 2.70) |
2.10 (1.46, 2.70) |
|
| Range |
|
0.50, 13.00 |
0.50, 13.00 |
0.60, 6.60 |
|
| HDL-C |
388 |
|
|
|
0.119 |
| Mean (SD) |
|
1.23 (0.28) |
1.23 (0.25) |
1.21 (0.34) |
|
| Median (IQR) |
|
1.20 (1.00, 1.40) |
1.20 (1.00, 1.40) |
1.20 (1.00, 1.30) |
|
| Range |
|
0.70, 3.60 |
0.70, 2.20 |
0.70, 3.60 |
|
| LDL-C |
388 |
|
|
|
0.331 |
| Mean (SD) |
|
3.36 (1.19) |
3.32 (1.23) |
3.44 (1.12) |
|
| Median (IQR) |
|
3.31 (2.48, 4.18) |
3.31 (2.44, 4.10) |
3.36 (2.66, 4.22) |
|
| Range |
|
0.77, 9.45 |
0.77, 9.45 |
0.82, 6.30 |
|
| Non-HDL-C |
388 |
|
|
|
0.155 |
| Mean (SD) |
|
4.31 (1.27) |
4.24 (1.30) |
4.45 (1.22) |
|
| Median (IQR) |
|
4.30 (3.50, 5.10) |
4.20 (3.30, 5.03) |
4.50 (3.60, 5.10) |
|
| Range |
|
1.30, 10.40 |
1.30, 10.40 |
1.70, 7.60 |
|
| FLI |
258 |
|
|
|
0.122 |
| Mean (SD) |
|
47.54 (21.54) |
46.16 (22.25) |
50.16 (19.98) |
|
| Median (IQR) |
|
46.87 (31.38, 62.86) |
44.84 (30.13, 59.81) |
49.50 (37.00, 65.33) |
|
| Range |
|
3.72, 98.08 |
3.72, 98.08 |
7.97, 93.39 |
|
| Unknown |
|
130 |
87 |
43 |
|
| Tỷ số LDL/HDL |
388 |
|
|
|
0.029 |
| Mean (SD) |
|
2.80 (1.00) |
2.73 (0.97) |
2.95 (1.03) |
|
| Median (IQR) |
|
2.76 (2.07, 3.50) |
2.66 (2.03, 3.36) |
3.02 (2.18, 3.65) |
|
| Range |
|
0.75, 6.75 |
0.82, 6.75 |
0.75, 6.30 |
|
| Tỷ số HDL/Non-HDL |
388 |
|
|
|
0.006 |
| Mean (SD) |
|
0.31 (0.12) |
0.32 (0.12) |
0.30 (0.12) |
|
| Median (IQR) |
|
0.28 (0.23, 0.36) |
0.29 (0.24, 0.37) |
0.25 (0.22, 0.34) |
|
| Range |
|
0.13, 0.86 |
0.13, 0.77 |
0.13, 0.86 |
|
| Chỉ số FIB-4 |
387 |
|
|
|
0.590 |
| Mean (SD) |
|
1.80 (0.87) |
1.81 (0.88) |
1.78 (0.86) |
|
| Median (IQR) |
|
1.61 (1.27, 2.14) |
1.61 (1.28, 2.16) |
1.61 (1.23, 2.11) |
|
| Range |
|
0.07, 7.90 |
0.07, 7.90 |
0.58, 6.72 |
|
| Unknown |
|
1 |
1 |
0 |
|
| Glucose máu |
388 |
|
|
|
0.575 |
| Mean (SD) |
|
6.50 (2.25) |
6.44 (2.17) |
6.61 (2.39) |
|
| Median (IQR) |
|
5.90 (5.20, 6.80) |
5.85 (5.20, 6.70) |
5.90 (5.30, 7.10) |
|
| Range |
|
3.90, 20.50 |
3.90, 20.50 |
4.00, 19.70 |
|
| HbA1c |
294 |
|
|
|
0.878 |
| Mean (SD) |
|
6.48 (1.27) |
6.48 (1.28) |
6.47 (1.24) |
|
| Median (IQR) |
|
6.05 (5.70, 6.90) |
6.00 (5.70, 6.90) |
6.10 (5.70, 7.10) |
|
| Range |
|
4.10, 13.40 |
4.10, 13.40 |
4.20, 12.00 |
|
| Unknown |
|
94 |
68 |
26 |
|
| ALT |
387 |
|
|
|
0.886 |
| Mean (SD) |
|
28.61 (16.94) |
29.16 (18.25) |
27.55 (14.07) |
|
| Median (IQR) |
|
23.00 (18.00, 34.00) |
23.00 (18.00, 34.25) |
24.00 (18.00, 33.25) |
|
| Range |
|
6.00, 113.00 |
6.00, 113.00 |
7.00, 99.00 |
|
| Unknown |
|
1 |
1 |
0 |
|
| AST |
387 |
|
|
|
0.897 |
| Mean (SD) |
|
28.16 (10.37) |
28.53 (11.26) |
27.45 (8.38) |
|
| Median (IQR) |
|
26.00 (22.00, 31.00) |
25.70 (22.00, 31.00) |
26.00 (22.00, 31.00) |
|
| Range |
|
2.50, 87.20 |
2.50, 87.20 |
11.00, 61.00 |
|
| Unknown |
|
1 |
1 |
0 |
|
| GGT |
258 |
|
|
|
0.422 |
| Mean (SD) |
|
49.54 (43.38) |
51.98 (49.10) |
44.90 (29.32) |
|
| Median (IQR) |
|
38.50 (25.00, 57.00) |
39.00 (26.00, 57.00) |
34.00 (25.00, 56.00) |
|
| Range |
|
6.30, 421.00 |
8.60, 421.00 |
6.30, 162.00 |
|
| Unknown |
|
130 |
87 |
43 |
|
| Ure |
388 |
|
|
|
0.039 |
| Mean (SD) |
|
5.60 (1.77) |
5.74 (1.87) |
5.31 (1.53) |
|
| Median (IQR) |
|
5.30 (4.40, 6.40) |
5.49 (4.50, 6.60) |
5.15 (4.30, 6.22) |
|
| Range |
|
2.30, 19.10 |
2.40, 19.10 |
2.30, 11.30 |
|
| Creatinin |
388 |
|
|
|
0.882 |
| Mean (SD) |
|
89.03 (19.59) |
89.24 (19.17) |
88.62 (20.45) |
|
| Median (IQR) |
|
88.00 (75.93, 100.00) |
87.50 (75.53, 101.00) |
89.00 (76.00, 98.00) |
|
| Range |
|
46.30, 182.00 |
53.00, 176.00 |
46.30, 182.00 |
|
| Tiểu cầu |
388 |
|
|
|
0.915 |
| Mean (SD) |
|
229.68 (60.66) |
229.92 (62.10) |
229.21 (58.00) |
|
| Median (IQR) |
|
221.00 (189.00, 263.25) |
220.00 (190.50, 260.50) |
224.50 (188.50, 265.25) |
|
| Range |
|
96.00, 561.00 |
97.00, 561.00 |
96.00, 415.00 |
|
| Điểm vôi hóa (Agatston) |
324 |
|
|
|
0.001 |
| Mean (SD) |
|
364.51 (461.86) |
327.49 (456.00) |
446.24 (466.44) |
|
| Median (IQR) |
|
188.91 (63.17, 485.14) |
142.13 (55.02, 423.30) |
277.40 (119.28, 609.94) |
|
| Range |
|
0.00, 2,893.28 |
0.00, 2,893.28 |
0.00, 2,183.94 |
|
| Unknown |
|
64 |
33 |
31 |
|
| Hẹp nhiều nhánh |
388 |
203 / 388 (52%) |
114 / 256 (45%) |
89 / 132 (67%) |
<0.001 |
| NT-proBNP |
170 |
|
|
|
0.581 |
| Mean (SD) |
|
499.27 (1,421.86) |
421.38 (1,266.60) |
613.28 (1,625.74) |
|
| Median (IQR) |
|
98.25 (42.56, 232.38) |
99.22 (41.40, 219.40) |
83.50 (48.09, 290.00) |
|
| Range |
|
5.00, 10,005.00 |
5.00, 9,306.00 |
8.43, 10,005.00 |
|
| Unknown |
|
218 |
155 |
63 |
|
| Acid uric máu |
307 |
|
|
|
0.892 |
| Mean (SD) |
|
408.20 (96.73) |
409.84 (97.83) |
404.99 (94.95) |
|
| Median (IQR) |
|
410.00 (340.50, 469.50) |
410.00 (340.50, 468.75) |
405.50 (339.25, 476.25) |
|
| Range |
|
161.00, 742.60 |
161.00, 742.60 |
216.00, 601.30 |
|
| Unknown |
|
81 |
53 |
28 |
|
Đặc điểm dân số nghiên cứu ở phân nhóm MAFLD
tbl4 <- mafld_mace %>%
select(
sex, age, dtd, toa_ucmc, toa_bb, toa_kkttc, toa_statin, toa_nitrate,
toa_trime, toa_ccb, toa_loitieu, toa_metfor, toa_su, toa_sglt2,
toa_dpp4, toa_insulin, sagbt, sagm, giatrinhm, donhm, doxh,
giatrixh, cc, cn, bmi, bmi_phando, eo, hbsag, antihcv, cholestp,
trig, hld, ldl, nonhdl, fli, ldlhdl, hdlnonhdl, fib4, glucose,
hba1c, alt, ast, ggt, ure, cre, plt, agaston, multisteno,
ntbnp, auric, canthiepct, nmctc, cdtnkod, dqn, stc, maceg, mace, mafld_sub
) %>%
tbl_summary(
by = mafld_sub,
type = all_continuous() ~ "continuous2",
statistic = list(
all_continuous() ~ c("{mean} ({sd})", "{median} ({p25}, {p75})", "{min}, {max}"),
all_categorical() ~ "{n} / {N} ({p}%)"
),
digits = all_continuous() ~ 2,
label = list(
sex ~ "Giới tính",
age ~ "Tuổi",
dtd ~ "Đái tháo đường",
toa_ucmc ~ "Thuốc ức chế men chuyển",
toa_bb ~ "Thuốc chẹn beta",
toa_kkttc ~ "Thuốc kháng kết tập tiểu cầu",
toa_statin ~ "Statin",
toa_nitrate ~ "Nitrate",
toa_trime ~ "Trimetazidine",
toa_ccb ~ "Thuốc chẹn kênh canxi",
toa_loitieu ~ "Thuốc lợi tiểu",
toa_metfor ~ "Metformin",
toa_su ~ "Sulfonylurea",
toa_sglt2 ~ "SGLT2i",
toa_dpp4 ~ "DPP4i",
toa_insulin ~ "Insulin",
sagbt ~ "Siêu âm gan bình thường",
sagm ~ "Siêu âm gan nhiễm mỡ",
giatrinhm ~ "Giá trị nhiễm mỡ",
donhm ~ "Độ nhiễm mỡ",
doxh ~ "Độ xơ hóa",
giatrixh ~ "Giá trị xơ hóa",
cc ~ "Chiều cao",
cn ~ "Cân nặng",
bmi ~ "BMI",
bmi_phando ~ "Phân độ BMI",
eo ~ "Vòng eo",
hbsag ~ "HBsAg (+)",
antihcv ~ "Anti-HCV (+)",
cholestp ~ "Cholesterol toàn phần",
trig ~ "Triglyceride",
hld ~ "HDL-C",
ldl ~ "LDL-C",
nonhdl ~ "Non-HDL-C",
fli ~ "FLI",
ldlhdl ~ "Tỷ số LDL/HDL",
hdlnonhdl ~ "Tỷ số HDL/Non-HDL",
fib4 ~ "Chỉ số FIB-4",
glucose ~ "Glucose máu",
hba1c ~ "HbA1c",
alt ~ "ALT",
ast ~ "AST",
ggt ~ "GGT",
ure ~ "Ure",
cre ~ "Creatinin",
plt ~ "Tiểu cầu",
agaston ~ "Điểm vôi hóa (Agatston)",
multisteno ~ "Hẹp nhiều nhánh",
ntbnp ~ "NT-proBNP",
auric ~ "Acid uric máu",
canthiepct ~ "Can thiệp ĐMV",
nmctc ~ "Nhồi máu cơ tim cấp",
cdtnkod ~ "Đau thắt ngực không ổn định",
dqn ~ "Đột quỵ não",
stc ~ "Suy tim cấp",
maceg ~ "MACE mở rộng",
mace ~ "MACE",
missing_text = "(Missing)"
)) %>%
add_p(pvalue_fun = ~ style_pvalue(.x, digits = 3)) %>%
add_overall() %>%
add_n() %>%
modify_caption("**Đặc điểm dân số nghiên cứu**") %>%
bold_labels()
## 195 observations missing `mafld_sub` have been removed. To include these observations, use `forcats::fct_na_value_to_level()` on `mafld_sub` column before passing to `tbl_summary()`.
## There was an error in 'add_p()/add_difference()' for variable 'bmi_phando', p-value omitted:
## Error in stats::fisher.test(c("Béo phì độ I", "Thiếu cân", "Béo phì độ I", : FEXACT error 7(location). LDSTP=18630 is too small for this problem,
## (pastp=24.5859, ipn_0:=ipoin[itp=27]=1162, stp[ipn_0]=35.2311).
## Increase workspace or consider using 'simulate.p.value=TRUE'
## There was an error in 'add_p()/add_difference()' for variable 'stc', p-value omitted:
## Error in stats::chisq.test(x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, : 'x' and 'y' must have at least 2 levels
tbl4
Đặc điểm dân số nghiên cứu
| Characteristic |
N |
Overall, N = 193 |
1, N = 77 |
2, N = 99 |
3, N = 17 |
p-value |
| Giới tính |
193 |
116 / 193 (60%) |
43 / 77 (56%) |
64 / 99 (65%) |
9 / 17 (53%) |
0.407 |
| Tuổi |
193 |
|
|
|
|
0.862 |
| Mean (SD) |
|
69.48 (9.28) |
69.45 (10.37) |
69.26 (8.86) |
70.82 (6.30) |
|
| Median (IQR) |
|
70.00 (63.00, 75.00) |
70.00 (63.00, 77.00) |
71.00 (62.00, 75.00) |
69.00 (68.00, 75.00) |
|
| Range |
|
44.00, 88.00 |
44.00, 88.00 |
44.00, 88.00 |
60.00, 84.00 |
|
| Đái tháo đường |
193 |
77 / 193 (40%) |
77 / 77 (100%) |
0 / 99 (0%) |
0 / 17 (0%) |
<0.001 |
| Thuốc ức chế men chuyển |
193 |
|
|
|
|
0.969 |
| 0 |
|
62 / 193 (32%) |
25 / 77 (32%) |
32 / 99 (32%) |
5 / 17 (29%) |
|
| 1 |
|
131 / 193 (68%) |
52 / 77 (68%) |
67 / 99 (68%) |
12 / 17 (71%) |
|
| Thuốc chẹn beta |
193 |
|
|
|
|
0.578 |
| 0 |
|
74 / 193 (38%) |
28 / 77 (36%) |
41 / 99 (41%) |
5 / 17 (29%) |
|
| 1 |
|
119 / 193 (62%) |
49 / 77 (64%) |
58 / 99 (59%) |
12 / 17 (71%) |
|
| Thuốc kháng kết tập tiểu cầu |
193 |
|
|
|
|
0.903 |
| 0 |
|
44 / 193 (23%) |
17 / 77 (22%) |
24 / 99 (24%) |
3 / 17 (18%) |
|
| 1 |
|
149 / 193 (77%) |
60 / 77 (78%) |
75 / 99 (76%) |
14 / 17 (82%) |
|
| Statin |
193 |
|
|
|
|
0.465 |
| 0 |
|
38 / 193 (20%) |
13 / 77 (17%) |
23 / 99 (23%) |
2 / 17 (12%) |
|
| 1 |
|
155 / 193 (80%) |
64 / 77 (83%) |
76 / 99 (77%) |
15 / 17 (88%) |
|
| Nitrate |
193 |
|
|
|
|
0.358 |
| 0 |
|
144 / 193 (75%) |
61 / 77 (79%) |
72 / 99 (73%) |
11 / 17 (65%) |
|
| 1 |
|
49 / 193 (25%) |
16 / 77 (21%) |
27 / 99 (27%) |
6 / 17 (35%) |
|
| Trimetazidine |
193 |
53 / 193 (27%) |
14 / 77 (18%) |
30 / 99 (30%) |
9 / 17 (53%) |
0.011 |
| Thuốc chẹn kênh canxi |
193 |
|
|
|
|
0.701 |
| 0 |
|
132 / 193 (68%) |
55 / 77 (71%) |
65 / 99 (66%) |
12 / 17 (71%) |
|
| 1 |
|
61 / 193 (32%) |
22 / 77 (29%) |
34 / 99 (34%) |
5 / 17 (29%) |
|
| Thuốc lợi tiểu |
193 |
32 / 193 (17%) |
14 / 77 (18%) |
15 / 99 (15%) |
3 / 17 (18%) |
0.804 |
| Metformin |
193 |
43 / 193 (22%) |
43 / 77 (56%) |
0 / 99 (0%) |
0 / 17 (0%) |
<0.001 |
| Sulfonylurea |
193 |
12 / 193 (6.2%) |
12 / 77 (16%) |
0 / 99 (0%) |
0 / 17 (0%) |
<0.001 |
| SGLT2i |
193 |
15 / 193 (7.8%) |
12 / 77 (16%) |
3 / 99 (3.0%) |
0 / 17 (0%) |
0.006 |
| DPP4i |
193 |
9 / 193 (4.7%) |
9 / 77 (12%) |
0 / 99 (0%) |
0 / 17 (0%) |
<0.001 |
| Insulin |
193 |
3 / 193 (1.6%) |
3 / 77 (3.9%) |
0 / 99 (0%) |
0 / 17 (0%) |
0.125 |
| Siêu âm gan bình thường |
193 |
12 / 193 (6.2%) |
2 / 77 (2.6%) |
9 / 99 (9.1%) |
1 / 17 (5.9%) |
0.204 |
| Siêu âm gan nhiễm mỡ |
193 |
178 / 193 (92%) |
74 / 77 (96%) |
88 / 99 (89%) |
16 / 17 (94%) |
0.167 |
| Giá trị nhiễm mỡ |
193 |
|
|
|
|
0.119 |
| Mean (SD) |
|
281.07 (26.97) |
285.34 (26.38) |
277.46 (27.21) |
282.71 (26.75) |
|
| Median (IQR) |
|
278.00 (256.00, 302.00) |
286.00 (263.00, 306.00) |
270.00 (254.00, 297.50) |
282.00 (257.00, 297.00) |
|
| Range |
|
244.00, 354.00 |
245.00, 346.00 |
244.00, 354.00 |
252.00, 328.00 |
|
| Độ nhiễm mỡ |
193 |
|
|
|
|
0.276 |
| 2 |
|
76 / 193 (39%) |
23 / 77 (30%) |
46 / 99 (46%) |
7 / 17 (41%) |
|
| 3 |
|
58 / 193 (30%) |
26 / 77 (34%) |
27 / 99 (27%) |
5 / 17 (29%) |
|
| 4 |
|
59 / 193 (31%) |
28 / 77 (36%) |
26 / 99 (26%) |
5 / 17 (29%) |
|
| Độ xơ hóa |
193 |
|
|
|
|
0.601 |
| 1 |
|
123 / 193 (64%) |
45 / 77 (58%) |
66 / 99 (67%) |
12 / 17 (71%) |
|
| 2 |
|
48 / 193 (25%) |
20 / 77 (26%) |
24 / 99 (24%) |
4 / 17 (24%) |
|
| 3 |
|
16 / 193 (8.3%) |
9 / 77 (12%) |
7 / 99 (7.1%) |
0 / 17 (0%) |
|
| 4 |
|
6 / 193 (3.1%) |
3 / 77 (3.9%) |
2 / 99 (2.0%) |
1 / 17 (5.9%) |
|
| Giá trị xơ hóa |
193 |
|
|
|
|
0.129 |
| Mean (SD) |
|
6.99 (2.18) |
7.29 (2.12) |
6.77 (2.17) |
6.84 (2.49) |
|
| Median (IQR) |
|
6.50 (5.50, 7.80) |
6.90 (5.80, 8.50) |
6.30 (5.35, 7.60) |
6.00 (5.60, 7.30) |
|
| Range |
|
3.80, 16.90 |
3.90, 13.80 |
3.80, 16.90 |
4.40, 14.90 |
|
| Chiều cao |
193 |
|
|
|
|
0.647 |
| Mean (SD) |
|
1.60 (0.07) |
1.60 (0.07) |
1.60 (0.07) |
1.61 (0.08) |
|
| Median (IQR) |
|
1.60 (1.55, 1.65) |
1.60 (1.53, 1.65) |
1.60 (1.55, 1.65) |
1.63 (1.55, 1.68) |
|
| Range |
|
1.45, 1.76 |
1.45, 1.75 |
1.45, 1.76 |
1.45, 1.72 |
|
| Cân nặng |
193 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
64.85 (8.80) |
64.05 (8.77) |
66.88 (8.17) |
56.65 (7.36) |
|
| Median (IQR) |
|
65.00 (60.00, 71.00) |
64.00 (59.00, 70.00) |
67.00 (60.00, 72.00) |
59.00 (50.00, 63.00) |
|
| Range |
|
40.00, 92.00 |
40.00, 90.00 |
52.00, 92.00 |
45.00, 68.00 |
|
| BMI |
193 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
25.29 (2.84) |
25.10 (3.02) |
26.05 (2.40) |
21.73 (1.21) |
|
| Median (IQR) |
|
24.80 (23.53, 26.67) |
24.62 (23.42, 26.67) |
25.48 (24.19, 27.12) |
22.21 (21.88, 22.32) |
|
| Range |
|
18.26, 35.16 |
18.26, 35.16 |
23.11, 33.98 |
18.49, 22.99 |
|
| Phân độ BMI |
193 |
|
|
|
|
|
| Béo phì độ I |
|
76 / 193 (39%) |
25 / 77 (32%) |
51 / 99 (52%) |
0 / 17 (0%) |
|
| Béo phì độ II |
|
12 / 193 (6.2%) |
5 / 77 (6.5%) |
7 / 99 (7.1%) |
0 / 17 (0%) |
|
| Bình thường |
|
29 / 193 (15%) |
13 / 77 (17%) |
0 / 99 (0%) |
16 / 17 (94%) |
|
| Thiếu cân |
|
2 / 193 (1.0%) |
1 / 77 (1.3%) |
0 / 99 (0%) |
1 / 17 (5.9%) |
|
| Thừa cân |
|
74 / 193 (38%) |
33 / 77 (43%) |
41 / 99 (41%) |
0 / 17 (0%) |
|
| Vòng eo |
193 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
93.07 (7.00) |
93.08 (7.35) |
94.15 (6.50) |
86.76 (4.83) |
|
| Median (IQR) |
|
92.00 (89.00, 96.00) |
92.00 (88.00, 95.00) |
93.00 (90.00, 96.00) |
89.00 (85.00, 90.00) |
|
| Range |
|
75.00, 119.00 |
75.00, 112.00 |
80.00, 119.00 |
78.00, 95.00 |
|
| HBsAg (+) |
103 |
5 / 103 (4.9%) |
3 / 43 (7.0%) |
2 / 50 (4.0%) |
0 / 10 (0%) |
0.798 |
| Unknown |
|
90 |
34 |
49 |
7 |
|
| Anti-HCV (+) |
101 |
4 / 101 (4.0%) |
0 / 43 (0%) |
2 / 49 (4.1%) |
2 / 9 (22%) |
0.020 |
| Unknown |
|
92 |
34 |
50 |
8 |
|
| Cholesterol toàn phần |
193 |
|
|
|
|
0.682 |
| Mean (SD) |
|
5.70 (1.26) |
5.76 (1.42) |
5.63 (1.14) |
5.75 (1.18) |
|
| Median (IQR) |
|
5.70 (4.80, 6.50) |
5.80 (4.60, 6.80) |
5.60 (4.80, 6.30) |
6.00 (4.90, 6.30) |
|
| Range |
|
2.30, 9.00 |
2.30, 9.00 |
3.00, 8.90 |
3.40, 8.30 |
|
| Triglyceride |
193 |
|
|
|
|
0.042 |
| Mean (SD) |
|
2.37 (1.45) |
2.69 (1.76) |
2.18 (1.20) |
2.06 (0.81) |
|
| Median (IQR) |
|
2.10 (1.40, 2.90) |
2.30 (1.70, 3.10) |
2.00 (1.30, 2.55) |
2.10 (1.50, 2.60) |
|
| Range |
|
0.80, 13.00 |
0.80, 13.00 |
0.90, 6.10 |
0.80, 3.70 |
|
| HDL-C |
193 |
|
|
|
|
0.660 |
| Mean (SD) |
|
1.24 (0.25) |
1.21 (0.23) |
1.25 (0.27) |
1.26 (0.27) |
|
| Median (IQR) |
|
1.20 (1.00, 1.40) |
1.20 (1.00, 1.40) |
1.20 (1.06, 1.40) |
1.30 (1.00, 1.50) |
|
| Range |
|
0.70, 2.00 |
0.77, 1.90 |
0.70, 2.00 |
0.80, 1.70 |
|
| LDL-C |
193 |
|
|
|
|
0.951 |
| Mean (SD) |
|
3.46 (1.11) |
3.44 (1.20) |
3.45 (1.02) |
3.55 (1.18) |
|
| Median (IQR) |
|
3.30 (2.65, 4.24) |
3.20 (2.54, 4.30) |
3.31 (2.72, 4.18) |
3.55 (2.76, 4.22) |
|
| Range |
|
0.85, 6.53 |
0.85, 6.53 |
1.20, 6.01 |
1.74, 6.30 |
|
| Non-HDL-C |
193 |
|
|
|
|
0.678 |
| Mean (SD) |
|
4.47 (1.21) |
4.55 (1.36) |
4.41 (1.08) |
4.49 (1.32) |
|
| Median (IQR) |
|
4.40 (3.60, 5.30) |
4.60 (3.50, 5.50) |
4.30 (3.75, 5.00) |
4.90 (3.40, 5.20) |
|
| Range |
|
1.30, 7.60 |
1.30, 7.60 |
1.70, 7.56 |
2.10, 7.30 |
|
| FLI |
131 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
57.54 (19.21) |
60.19 (19.37) |
58.76 (18.01) |
34.57 (9.34) |
|
| Median (IQR) |
|
57.07 (42.46, 71.94) |
60.62 (49.28, 74.89) |
58.09 (44.80, 72.55) |
34.27 (27.94, 42.97) |
|
| Range |
|
21.21, 98.08 |
21.72, 98.08 |
24.27, 96.05 |
21.21, 46.87 |
|
| Unknown |
|
62 |
20 |
35 |
7 |
|
| Tỷ số LDL/HDL |
193 |
|
|
|
|
0.904 |
| Mean (SD) |
|
2.87 (0.97) |
2.88 (0.98) |
2.83 (0.88) |
3.04 (1.40) |
|
| Median (IQR) |
|
2.80 (2.10, 3.58) |
2.76 (2.12, 3.58) |
2.80 (2.14, 3.54) |
3.32 (1.84, 4.09) |
|
| Range |
|
0.82, 6.30 |
0.82, 5.42 |
0.92, 5.00 |
1.17, 6.30 |
|
| Tỷ số HDL/Non-HDL |
193 |
|
|
|
|
0.468 |
| Mean (SD) |
|
0.30 (0.11) |
0.29 (0.12) |
0.30 (0.10) |
0.32 (0.16) |
|
| Median (IQR) |
|
0.28 (0.22, 0.34) |
0.27 (0.22, 0.32) |
0.28 (0.23, 0.34) |
0.25 (0.19, 0.43) |
|
| Range |
|
0.13, 0.77 |
0.15, 0.77 |
0.13, 0.76 |
0.14, 0.62 |
|
| Chỉ số FIB-4 |
193 |
|
|
|
|
0.995 |
| Mean (SD) |
|
1.81 (0.87) |
1.86 (1.03) |
1.77 (0.73) |
1.78 (0.80) |
|
| Median (IQR) |
|
1.61 (1.26, 2.17) |
1.61 (1.26, 2.17) |
1.61 (1.26, 2.20) |
1.72 (1.40, 1.83) |
|
| Range |
|
0.07, 6.72 |
0.07, 6.72 |
0.54, 4.12 |
0.89, 4.54 |
|
| Glucose máu |
193 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
6.75 (2.23) |
8.33 (2.67) |
5.63 (0.70) |
6.10 (1.62) |
|
| Median (IQR) |
|
6.10 (5.40, 7.20) |
7.30 (6.60, 9.10) |
5.60 (5.16, 6.00) |
5.90 (5.30, 6.50) |
|
| Range |
|
4.20, 19.70 |
5.10, 19.70 |
4.20, 7.80 |
4.20, 11.70 |
|
| HbA1c |
160 |
|
|
|
|
<0.001 |
| Mean (SD) |
|
6.59 (1.20) |
7.34 (1.24) |
5.93 (0.59) |
5.99 (1.11) |
|
| Median (IQR) |
|
6.20 (5.80, 7.23) |
7.20 (6.45, 7.80) |
5.80 (5.60, 6.10) |
5.80 (5.55, 5.90) |
|
| Range |
|
4.20, 12.00 |
5.20, 12.00 |
4.20, 8.07 |
5.10, 9.00 |
|
| Unknown |
|
33 |
2 |
24 |
7 |
|
| ALT |
193 |
|
|
|
|
0.156 |
| Mean (SD) |
|
32.46 (18.24) |
35.53 (20.25) |
30.33 (16.67) |
30.94 (16.30) |
|
| Median (IQR) |
|
28.00 (20.00, 39.00) |
30.00 (21.00, 41.00) |
27.00 (19.00, 35.85) |
25.00 (21.00, 35.00) |
|
| Range |
|
7.00, 113.00 |
9.00, 113.00 |
7.00, 99.00 |
14.00, 69.00 |
|
| AST |
193 |
|
|
|
|
0.579 |
| Mean (SD) |
|
29.98 (10.91) |
31.02 (11.93) |
29.33 (10.36) |
29.01 (9.24) |
|
| Median (IQR) |
|
27.00 (23.00, 34.00) |
27.20 (24.00, 37.00) |
27.00 (23.00, 33.70) |
25.70 (24.40, 30.00) |
|
| Range |
|
2.50, 73.00 |
2.50, 73.00 |
15.00, 66.00 |
20.00, 57.00 |
|
| GGT |
131 |
|
|
|
|
0.535 |
| Mean (SD) |
|
56.95 (51.73) |
65.40 (70.25) |
51.20 (29.61) |
45.56 (31.25) |
|
| Median (IQR) |
|
46.00 (29.00, 65.50) |
49.00 (29.00, 67.00) |
44.85 (30.75, 65.75) |
36.50 (29.00, 53.25) |
|
| Range |
|
6.30, 421.00 |
15.00, 421.00 |
6.30, 148.00 |
16.00, 125.60 |
|
| Unknown |
|
62 |
20 |
35 |
7 |
|
| Ure |
193 |
|
|
|
|
0.167 |
| Mean (SD) |
|
5.43 (1.53) |
5.43 (1.50) |
5.53 (1.58) |
4.87 (1.29) |
|
| Median (IQR) |
|
5.20 (4.30, 6.27) |
5.10 (4.50, 6.40) |
5.40 (4.20, 6.20) |
4.50 (4.00, 5.30) |
|
| Range |
|
2.30, 11.30 |
2.30, 11.30 |
2.80, 10.20 |
3.17, 8.10 |
|
| Creatinin |
193 |
|
|
|
|
0.772 |
| Mean (SD) |
|
87.51 (18.62) |
87.21 (17.35) |
88.45 (20.02) |
83.44 (15.83) |
|
| Median (IQR) |
|
88.00 (75.00, 98.00) |
85.00 (77.00, 98.10) |
89.00 (73.85, 97.30) |
88.00 (70.00, 95.00) |
|
| Range |
|
51.00, 148.00 |
51.00, 148.00 |
52.00, 145.00 |
56.70, 107.00 |
|
| Tiểu cầu |
193 |
|
|
|
|
0.584 |
| Mean (SD) |
|
229.72 (56.35) |
224.26 (54.84) |
234.11 (59.16) |
228.88 (46.08) |
|
| Median (IQR) |
|
222.00 (192.00, 265.00) |
225.00 (183.00, 257.00) |
222.00 (194.50, 276.00) |
218.00 (207.00, 257.00) |
|
| Range |
|
96.00, 415.00 |
96.00, 415.00 |
108.00, 371.00 |
127.00, 318.00 |
|
| Điểm vôi hóa (Agatston) |
170 |
|
|
|
|
0.431 |
| Mean (SD) |
|
350.90 (438.74) |
341.08 (365.08) |
381.80 (507.09) |
174.77 (150.89) |
|
| Median (IQR) |
|
207.31 (61.49, 427.60) |
220.79 (73.44, 443.05) |
192.34 (61.10, 456.17) |
180.69 (51.25, 233.36) |
|
| Range |
|
0.00, 2,407.55 |
0.00, 1,691.05 |
0.00, 2,407.55 |
8.39, 489.40 |
|
| Unknown |
|
23 |
9 |
9 |
5 |
|
| Hẹp nhiều nhánh |
193 |
97 / 193 (50%) |
38 / 77 (49%) |
52 / 99 (53%) |
7 / 17 (41%) |
0.674 |
| NT-proBNP |
89 |
|
|
|
|
0.943 |
| Mean (SD) |
|
277.36 (647.51) |
293.48 (647.24) |
278.80 (699.99) |
180.87 (204.71) |
|
| Median (IQR) |
|
99.22 (41.40, 239.00) |
87.51 (40.69, 216.48) |
113.80 (40.36, 239.25) |
88.40 (59.35, 203.30) |
|
| Range |
|
5.00, 4,633.00 |
5.00, 3,563.00 |
7.32, 4,633.00 |
41.40, 611.00 |
|
| Unknown |
|
104 |
39 |
55 |
10 |
|
| Acid uric máu |
162 |
|
|
|
|
0.024 |
| Mean (SD) |
|
417.07 (91.12) |
409.15 (96.87) |
429.99 (86.70) |
369.97 (75.82) |
|
| Median (IQR) |
|
412.50 (368.00, 475.75) |
391.00 (344.00, 464.00) |
429.00 (380.03, 481.50) |
363.00 (324.00, 422.00) |
|
| Range |
|
216.00, 661.40 |
226.70, 661.40 |
222.00, 632.00 |
216.00, 505.00 |
|
| Unknown |
|
31 |
14 |
13 |
4 |
|
| Can thiệp ĐMV |
193 |
87 / 193 (45%) |
32 / 77 (42%) |
45 / 99 (45%) |
10 / 17 (59%) |
0.430 |
| Nhồi máu cơ tim cấp |
193 |
1 / 193 (0.5%) |
0 / 77 (0%) |
0 / 99 (0%) |
1 / 17 (5.9%) |
0.088 |
| Đau thắt ngực không ổn định |
193 |
10 / 193 (5.2%) |
5 / 77 (6.5%) |
5 / 99 (5.1%) |
0 / 17 (0%) |
0.797 |
| Đột quỵ não |
193 |
3 / 193 (1.6%) |
1 / 77 (1.3%) |
2 / 99 (2.0%) |
0 / 17 (0%) |
>0.999 |
| Suy tim cấp |
193 |
0 / 193 (0%) |
0 / 77 (0%) |
0 / 99 (0%) |
0 / 17 (0%) |
|
| MACE mở rộng |
193 |
81 / 193 (42%) |
30 / 77 (39%) |
42 / 99 (42%) |
9 / 17 (53%) |
0.567 |
| MACE |
193 |
13 / 193 (6.7%) |
6 / 77 (7.8%) |
6 / 99 (6.1%) |
1 / 17 (5.9%) |
0.909 |
Hồi quy đơn biến - Kết cục MACE mở rộng
library(purrr)
library(broom)
mafld_mace <- mafld_mace %>%
mutate(mafld_sub = case_when(
mafld == 1 & dtd == 1 ~ 1, # MAFLD + ĐTĐ
mafld == 1 & dtd == 0 & bmi >= 23 ~ 2, # MAFLD + BMI ≥ 23
mafld == 1 & dtd == 0 & bmi < 23 ~ 3, # MAFLD + BMI < 23
TRUE ~ NA_real_
))
# Lấy danh sách tất cả biến ngoại trừ maceg
vars <- setdiff(names(mafld_mace), "maceg")
# Hàm chạy logistic đơn biến
uni_logistic <- function(var) {
form <- as.formula(paste("maceg ~", var))
glm(form, data = mafld_mace, family = binomial) %>%
tidy(exponentiate = TRUE, conf.int = TRUE) %>%
filter(term != "(Intercept)") %>%
mutate(variable = var)
}
# Chạy hồi quy đơn biến cho tất cả biến
results <- map_dfr(vars, uni_logistic) %>%
select(variable, term, estimate, conf.low, conf.high, p.value) %>%
arrange(p.value)
## 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 in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
## 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 in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
## 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
# Toàn bộ kết quả
results
## # A tibble: 63 × 6
## variable term estimate conf.low conf.high p.value
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 canthiepct canthiepct 1058. 331. 4855. 1.67e-25
## 2 multisteno multisteno 2.58 1.67 4.03 2.42e- 5
## 3 toa_statin toa_statin1 0.372 0.225 0.612 1.02e- 4
## 4 mafld mafld 2.04 1.33 3.15 1.10e- 3
## 5 toa_kkttc toa_kkttc1 0.523 0.329 0.834 6.34e- 3
## 6 sagbt sagbt 0.564 0.367 0.863 8.75e- 3
## 7 toa_bb toa_bb1 0.586 0.382 0.898 1.41e- 2
## 8 ure ure 0.855 0.743 0.974 2.32e- 2
## 9 sagm sagm 1.63 1.07 2.49 2.39e- 2
## 10 agaston agaston 1.00 1.00 1.00 3.55e- 2
## # ℹ 53 more rows
# Lọc các biến có p < 0.05
results_sig <- results %>%
filter(p.value < 0.05)
results_sig
## # A tibble: 13 × 6
## variable term estimate conf.low conf.high p.value
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 canthiepct canthiepct 1058. 331. 4855. 1.67e-25
## 2 multisteno multisteno 2.58 1.67 4.03 2.42e- 5
## 3 toa_statin toa_statin1 0.372 0.225 0.612 1.02e- 4
## 4 mafld mafld 2.04 1.33 3.15 1.10e- 3
## 5 toa_kkttc toa_kkttc1 0.523 0.329 0.834 6.34e- 3
## 6 sagbt sagbt 0.564 0.367 0.863 8.75e- 3
## 7 toa_bb toa_bb1 0.586 0.382 0.898 1.41e- 2
## 8 ure ure 0.855 0.743 0.974 2.32e- 2
## 9 sagm sagm 1.63 1.07 2.49 2.39e- 2
## 10 agaston agaston 1.00 1.00 1.00 3.55e- 2
## 11 ldlhdl ldlhdl 1.25 1.01 1.55 3.81e- 2
## 12 cn cn 1.02 1.00 1.05 4.70e- 2
## 13 stt stt 0.998 0.996 1.00 4.92e- 2
Kết quả cho thấy: Cân nặng, ldlhdl, ure, agaston, MAFLD, multisteno,
toa_statin, toa_kkttc, toa_bb, sagbt, sagm
Loại đa cộng tuyến - Hồi quy ELastic-Net. Sau đó chạy hồi quy
Logistic đa biến
library(glmnet)
## Loading required package: Matrix
## Loaded glmnet 4.1-8
# Tạo công thức
form <- maceg ~ cn + ldlhdl + ure + agaston + mafld + multisteno +
toa_statin + toa_kkttc + toa_bb + sagbt + sagm
# Loại bỏ hàng có NA ở bất kỳ biến nào
dat_model <- mafld_mace %>%
select(all.vars(form)) %>%
na.omit()
# X và y đồng bộ
xvars <- model.matrix(form, data = dat_model)[, -1] # bỏ intercept
yvar <- dat_model$maceg # giữ nguyên nhị phân 0/1, không cần scale
# Chạy Elastic Net
set.seed(123)
cvfit <- cv.glmnet(xvars, yvar, family = "binomial", alpha = 0.5)
# Vẽ biểu đồ CV
plot(cvfit)

# Hệ số tại lambda tối ưu
coef(cvfit, s = "lambda.min")
## 12 x 1 sparse Matrix of class "dgCMatrix"
## s1
## (Intercept) -0.8537967704
## cn .
## ldlhdl 0.2149197686
## ure -0.1439849611
## agaston 0.0002965299
## mafld 0.6905698467
## multisteno 0.7735296052
## toa_statin1 -0.7590100138
## toa_kkttc1 .
## toa_bb1 -0.1135805025
## sagbt .
## sagm .
Chạy mô hình Đa biến với các biến được chọn. Sau đó chạy Dominance
để đánh giá độ mạnh trong tiên lượng MACEG. Tiếp theo dùng mô hình BMA
để tạo ra mô hình tốt nhất.
library(dplyr)
library(broom)
# Mô hình logistic đa biến với các biến được chọn
model_multi <- glm(
maceg ~ ldlhdl + ure + agaston + mafld + multisteno + toa_statin + toa_bb,
data = mafld_mace,
family = binomial
)
# Tóm tắt mô hình
summary(model_multi)
##
## Call:
## glm(formula = maceg ~ ldlhdl + ure + agaston + mafld + multisteno +
## toa_statin + toa_bb, family = binomial, data = mafld_mace)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.8326853 0.6991554 -1.191 0.23366
## ldlhdl 0.2821955 0.1322354 2.134 0.03284 *
## ure -0.1945685 0.0844208 -2.305 0.02118 *
## agaston 0.0003976 0.0002862 1.390 0.16468
## mafld 0.8321174 0.2648677 3.142 0.00168 **
## multisteno 0.9084059 0.2777045 3.271 0.00107 **
## toa_statin1 -0.8974041 0.3655036 -2.455 0.01408 *
## toa_bb1 -0.1750188 0.3033837 -0.577 0.56401
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 402.07 on 323 degrees of freedom
## Residual deviance: 357.98 on 316 degrees of freedom
## (64 observations deleted due to missingness)
## AIC: 373.98
##
## Number of Fisher Scoring iterations: 4
# Bảng OR, CI 95%, p-value
results_multi <- broom::tidy(model_multi, exponentiate = TRUE, conf.int = TRUE)
results_multi
## # A tibble: 8 × 7
## term estimate std.error statistic p.value conf.low conf.high
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 (Intercept) 0.435 0.699 -1.19 0.234 0.110 1.72
## 2 ldlhdl 1.33 0.132 2.13 0.0328 1.02 1.72
## 3 ure 0.823 0.0844 -2.30 0.0212 0.693 0.967
## 4 agaston 1.00 0.000286 1.39 0.165 1.00 1.00
## 5 mafld 2.30 0.265 3.14 0.00168 1.38 3.90
## 6 multisteno 2.48 0.278 3.27 0.00107 1.45 4.31
## 7 toa_statin1 0.408 0.366 -2.46 0.0141 0.197 0.830
## 8 toa_bb1 0.839 0.303 -0.577 0.564 0.465 1.53
library(dominanceanalysis)
temp1 <- glm(maceg ~ ldlhdl + ure + agaston + mafld + multisteno + toa_statin + toa_bb
, family="binomial", data=mafld_mace)
dom <- dominanceAnalysis(temp1)
plot(dom, which.graph ="general",fit.function ="r2.m")

df <- data.frame(mafld_mace$ldlhdl, mafld_mace$ure, mafld_mace$agaston, mafld_mace$mafld,
mafld_mace$multisteno, mafld_mace$toa_statin, mafld_mace$toa_bb
, mafld_mace$maceg)
head(df)
## mafld_mace.ldlhdl mafld_mace.ure mafld_mace.agaston mafld_mace.mafld
## 1 2.935714 7.3 128.30 1
## 2 1.328571 3.5 243.70 0
## 3 1.972727 7.2 39.60 0
## 4 2.100000 5.3 338.94 1
## 5 1.920000 3.1 NA 1
## 6 3.594444 7.8 34.40 0
## mafld_mace.multisteno mafld_mace.toa_statin mafld_mace.toa_bb
## 1 0 1 1
## 2 1 1 1
## 3 0 1 1
## 4 0 1 1
## 5 0 1 1
## 6 1 1 1
## mafld_mace.maceg
## 1 0
## 2 0
## 3 0
## 4 0
## 5 0
## 6 0
attach(df)
names(df)
## [1] "mafld_mace.ldlhdl" "mafld_mace.ure" "mafld_mace.agaston"
## [4] "mafld_mace.mafld" "mafld_mace.multisteno" "mafld_mace.toa_statin"
## [7] "mafld_mace.toa_bb" "mafld_mace.maceg"
xvars <- df[,1:7]
y <- mafld_mace$maceg
library(survival)
## Warning: package 'survival' was built under R version 4.4.1
library(leaps)
library(robustbase)
##
## Attaching package: 'robustbase'
## The following object is masked from 'package:survival':
##
## heart
library(inline)
library(rrcov)
## Warning: package 'rrcov' was built under R version 4.4.1
## Scalable Robust Estimators with High Breakdown Point (version 1.7-6)
library(BMA)
bma.search1 <- bic.glm(xvars, y, strict=F, OR=20, glm.family="binomial")
## Warning in bic.glm.data.frame(xvars, y, strict = F, OR = 20, glm.family =
## "binomial"): There were 64 records deleted due to NA's
summary(bma.search1)
##
## Call:
## bic.glm.data.frame(x = xvars, y = y, glm.family = "binomial", strict = F, OR = 20)
##
##
## 13 models were selected
## Best 5 models (cumulative posterior probability = 0.814 ):
##
## p!=0 EV SD model 1 model 2
## Intercept 100 -0.9580728 8.019e-01 -1.064e+00 -3.987e-02
## mafld_mace.ldlhdl 22.1 0.0547791 1.194e-01 . .
## mafld_mace.ure 33.5 -0.0579335 9.466e-02 . -1.714e-01
## mafld_mace.agaston 4.9 0.0000131 8.469e-05 . .
## mafld_mace.mafld 96.0 0.8109491 3.040e-01 8.622e-01 8.298e-01
## mafld_mace.multisteno 100.0 0.9755691 2.613e-01 9.702e-01 1.008e+00
## mafld_mace.toa_statin 85.4 -0.8199539 4.485e-01 -9.310e-01 -1.027e+00
## mafld_mace.toa_bb 5.3 -0.0191572 1.095e-01 . .
##
## nVar 3 4
## BIC -1.481e+03 -1.480e+03
## post prob 0.349 0.199
## model 3 model 4 model 5
## Intercept -1.768e+00 -7.424e-01 -1.768e+00
## mafld_mace.ldlhdl 2.434e-01 2.549e-01 .
## mafld_mace.ure . -1.794e-01 .
## mafld_mace.agaston . . .
## mafld_mace.mafld 8.517e-01 8.213e-01 8.224e-01
## mafld_mace.multisteno 9.775e-01 1.022e+00 9.424e-01
## mafld_mace.toa_statin -9.286e-01 -1.025e+00 .
## mafld_mace.toa_bb . . .
##
## nVar 4 5 2
## BIC -1.479e+03 -1.478e+03 -1.478e+03
## post prob 0.119 0.076 0.071
imageplot.bma(bma.search1)

library(dplyr)
library(broom)
library(gtsummary)
# --- Mô hình 1: 3 biến mạnh nhất ---
model1 <- glm(
maceg ~ multisteno + mafld + toa_statin,
data = mafld_mace,
family = binomial
)
tbl_model1 <- model1 %>%
tbl_regression(
exponentiate = TRUE, # xuất OR thay vì log(OR)
label = list(
multisteno ~ "Hẹp nhiều nhánh",
mafld ~ "MAFLD",
toa_statin ~ "Statin"
)
) %>%
modify_caption("**Hồi quy logistic đa biến (mô hình 1: 3 biến mạnh nhất)**")
# --- Mô hình 2: mở rộng với ure + ldlhdl ---
model2 <- glm(
maceg ~ multisteno + mafld + toa_statin + ure + ldlhdl,
data = mafld_mace,
family = binomial
)
tbl_model2 <- model2 %>%
tbl_regression(
exponentiate = TRUE,
label = list(
multisteno ~ "Hẹp nhiều nhánh",
mafld ~ "MAFLD",
toa_statin ~ "Statin",
ure ~ "Ure",
ldlhdl ~ "Tỷ số LDL/HDL"
)
) %>%
modify_caption("**Hồi quy logistic đa biến (mô hình 2: mở rộng)**")
# Hiển thị kết quả
tbl_model1
Hồi quy logistic đa biến (mô hình 1: 3 biến mạnh nhất)
| Characteristic |
OR |
95% CI |
p-value |
| Hẹp nhiều nhánh |
2.77 |
1.76, 4.42 |
<0.001 |
| MAFLD |
2.37 |
1.51, 3.76 |
<0.001 |
| Statin |
|
|
|
| 0 |
— |
— |
|
| 1 |
0.34 |
0.20, 0.58 |
<0.001 |
tbl_model2
Hồi quy logistic đa biến (mô hình 2: mở rộng)
| Characteristic |
OR |
95% CI |
p-value |
| Hẹp nhiều nhánh |
2.85 |
1.80, 4.58 |
<0.001 |
| MAFLD |
2.23 |
1.41, 3.56 |
<0.001 |
| Statin |
|
|
|
| 0 |
— |
— |
|
| 1 |
0.33 |
0.19, 0.56 |
<0.001 |
| Ure |
0.84 |
0.72, 0.96 |
0.016 |
| Tỷ số LDL/HDL |
1.24 |
0.99, 1.56 |
0.058 |
Tạo thang điểm tiên lượng từ mô hình gồm 4 biến (MAFLD; toa thuốc
Statin LDL/HDL; bệnh mạch vành đa nhánh)
library(pROC)
## Type 'citation("pROC")' for a citation.
##
## Attaching package: 'pROC'
## The following objects are masked from 'package:stats':
##
## cov, smooth, var
roc_ldlhdl <- roc(mafld_mace$maceg, mafld_mace$ldlhdl, ci=TRUE)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
plot(roc_ldlhdl)

coords(roc_ldlhdl, "best", ret=c("threshold", "sensitivity", "specificity"))
## threshold sensitivity specificity
## 1 3.2 0.4621212 0.7070312
mafld_mace <- mafld_mace %>%
mutate(ldlhdl_cat = if_else(ldlhdl >= 2.5, 1, 0))
library(dplyr)
# Chạy lại mô hình logistic
model2 <- glm(
maceg ~ multisteno + mafld + toa_statin + ldlhdl_cat,
data = mafld_mace,
family = binomial
)
# Lấy hệ số
coefs <- coef(model2)
# Bỏ intercept
coefs <- coefs[-1]
# Quy đổi hệ số thành điểm
# chọn hệ số nhỏ nhất làm chuẩn
base <- min(abs(coefs[coefs != 0]))
points <- round(coefs / base)
score_table <- data.frame(
Variable = names(points),
Beta = coefs,
Point = points
)
score_table
## Variable Beta Point
## multisteno multisteno 1.0321914 2
## mafld mafld 0.8533359 2
## toa_statin1 toa_statin1 -1.1024571 -2
## ldlhdl_cat ldlhdl_cat 0.4559020 1
mafld_mace <- mafld_mace %>%
mutate(
multisteno_num = as.numeric(as.character(multisteno)),
mafld_num = as.numeric(as.character(mafld)),
toa_statin_num = as.numeric(as.character(toa_statin)),
ldlhdl_cat_num = as.numeric(as.character(ldlhdl_cat)),
D_MAFLD = 2*multisteno_num +
2*mafld_num +
(-2)*toa_statin_num +
1*ldlhdl_cat_num
)
table(mafld_mace$D_MAFLD)
##
## -2 -1 0 1 2 3 4 5
## 28 41 70 112 47 68 8 14
Thang điểm: D_MAFLD = 2(Có bệnh đa nhánh mạch vành) + 2(Có
MAFLD)) + (-2)(Đang sử dụng statin) + 1(Tỷ số
LDL/HDL>=2.5)
Đánh giá độ chính xác của mô hình D_MAFLD theo test Hosmer–Lemeshow
và vẽ Calibration
library(ResourceSelection)
## ResourceSelection 0.3-6 2023-06-27
library(ggplot2)
library(dplyr)
# Chạy lại logistic với thang điểm D_MAFLD
model_dmafld <- glm(maceg ~ D_MAFLD, data = mafld_mace, family = binomial)
# --- Hosmer–Lemeshow test ---
hl_test <- hoslem.test(model_dmafld$y, fitted(model_dmafld), g = 5)
## Warning in hoslem.test(model_dmafld$y, fitted(model_dmafld), g = 5): The data
## did not allow for the requested number of bins.
hl_test
##
## Hosmer and Lemeshow goodness of fit (GOF) test
##
## data: model_dmafld$y, fitted(model_dmafld)
## X-squared = 0.68585, df = 2, p-value = 0.7097
# --- Calibration plot ---
# Tính xác suất dự đoán
mafld_mace <- mafld_mace %>%
mutate(pred_prob = predict(model_dmafld, type = "response"))
# Chia thành 10 nhóm theo decile của xác suất dự đoán
mafld_mace <- mafld_mace %>%
mutate(decile = ntile(pred_prob, 10))
calib_data <- mafld_mace %>%
group_by(decile) %>%
summarise(
mean_pred = mean(pred_prob),
obs_rate = mean(maceg)
)
# Vẽ Calibration plot
ggplot(calib_data, aes(x = mean_pred, y = obs_rate)) +
geom_point(size=3, color="red") +
geom_abline(intercept=0, slope=1, linetype="dashed", color="blue") +
labs(
x = "Xác suất dự đoán trung bình",
y = "Tỷ lệ quan sát thực tế",
title = "Calibration plot cho mô hình D_MAFLD"
) +
theme_minimal()

Kiểm định mô hình bằng phương pháp thống kê khác như Hồi quy Rừng
ngẫu nhiên - Và tính độ chính xác của mô hình trên lâm sàng
# Hồi quy rừng ngẫu nhiên
library(dplyr)
library(missForest)
library(randomForest)
## Warning: package 'randomForest' was built under R version 4.4.1
## randomForest 4.7-1.2
## Type rfNews() to see new features/changes/bug fixes.
##
## Attaching package: 'randomForest'
## The following object is masked from 'package:ggplot2':
##
## margin
## The following object is masked from 'package:dplyr':
##
## combine
# 1. Chọn predictors
Xvars <- mafld_mace %>%
select(cn, ldlhdl, ure, agaston, mafld, multisteno,
toa_statin, toa_kkttc, toa_bb, sagbt, sagm)
# 2. Kiểm tra class từng biến
sapply(Xvars, class)
## cn ldlhdl ure agaston mafld multisteno
## "numeric" "numeric" "numeric" "numeric" "numeric" "numeric"
## toa_statin toa_kkttc toa_bb sagbt sagm
## "character" "character" "character" "numeric" "numeric"
# 3. Chuẩn hóa kiểu dữ liệu:
# - Biến nhị phân: factor
# - Biến liên tục: numeric
Xvars <- Xvars %>%
mutate(
mafld = as.factor(as.numeric(mafld)),
multisteno = as.factor(as.numeric(multisteno)),
toa_statin = as.factor(as.numeric(toa_statin)),
toa_kkttc = as.factor(as.numeric(toa_kkttc)),
toa_bb = as.factor(as.numeric(toa_bb)),
sagbt = as.factor(as.numeric(sagbt)),
sagm = as.factor(as.numeric(sagm)),
cn = as.numeric(cn),
ldlhdl = as.numeric(ldlhdl),
ure = as.numeric(ure),
agaston = as.numeric(agaston),
ldlhdl_cat = as.numeric(agaston)
)
# 4. Impute NA bằng missForest
set.seed(123)
imputed <- missForest(as.data.frame(Xvars))
X_imp <- imputed$ximp
# 5. Ghép lại với biến outcome
dat_rf_imp <- cbind(maceg = mafld_mace$maceg, X_imp)
# 6. Huấn luyện Random Forest
set.seed(123)
rf_model <- randomForest(
as.factor(maceg) ~ multisteno + mafld + toa_statin + ldlhdl_cat,
data = dat_rf_imp,
ntree = 500,
mtry = 3,
importance = TRUE
)
# 7. Xem độ quan trọng biến
importance(rf_model)
## 0 1 MeanDecreaseAccuracy MeanDecreaseGini
## multisteno 8.514372 8.401177 11.906458 9.904173
## mafld -1.542926 4.143104 1.182035 8.803516
## toa_statin 16.200768 7.994709 17.173032 10.083594
## ldlhdl_cat 4.380304 6.084525 6.880204 98.437307
varImpPlot(rf_model)

library(pROC)
# --- ROC cho RF ---
rf_prob <- predict(rf_model, type = "prob")[,2] # xác suất dự đoán lớp = 1
roc_rf <- roc(dat_rf_imp$maceg, rf_prob)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
# --- ROC cho D_MAFLD ---
roc_dmafld <- roc(mafld_mace$maceg, predict(model_dmafld, type = "response"))
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
# --- Vẽ ROC cùng lúc ---
plot(roc_rf, col = "blue", lwd = 2, main = "So sánh AUC")
plot(roc_dmafld, col = "red", lwd = 2, add = TRUE)
legend("bottomright", legend = c("Random Forest", "D_MAFLD"),
col = c("blue", "red"), lwd = 2)

# --- In AUC ---
auc(roc_rf)
## Area under the curve: 0.6062
auc(roc_dmafld)
## Area under the curve: 0.7058
# OOB Error rate
print(rf_model)
##
## Call:
## randomForest(formula = as.factor(maceg) ~ multisteno + mafld + toa_statin + ldlhdl_cat, data = dat_rf_imp, ntree = 500, mtry = 3, importance = TRUE)
## Type of random forest: classification
## Number of trees: 500
## No. of variables tried at each split: 3
##
## OOB estimate of error rate: 30.93%
## Confusion matrix:
## 0 1 class.error
## 0 217 39 0.1523438
## 1 81 51 0.6136364
# Độ chính xác OOB
oob_error <- rf_model$err.rate[rf_model$ntree, "OOB"]
oob_accuracy <- 1 - oob_error
oob_accuracy
## OOB
## 0.6907216
Vẽ Nomogram cho mô hình tiên lượng
library(rms)
## Loading required package: Hmisc
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
library(dplyr)
library(pROC)
library(ggplot2)
set.seed(12345)
# Chuyển 0/1 thành factor có nhãn để in đẹp trên nomogram
mafld_mace <- mafld_mace %>%
mutate(
multisteno = factor(multisteno, levels = c(0,1), labels = c("Không","Có")),
mafld = factor(mafld, levels = c(0,1), labels = c("Không","Có")),
toa_statin = factor(toa_statin, levels = c(0,1), labels = c("Không","Có")),
ldlhdl_cat = factor(ldlhdl_cat, levels = c(0,1), labels = c("<2.5","≥2.5")),
maceg = as.integer(maceg) # outcome nhị phân 0/1 để fit logistic
)
# Đặt nhãn biến cho rms (hiển thị trên nomogram)
label(mafld_mace$multisteno) <- "Hẹp nhiều nhánh"
label(mafld_mace$mafld) <- "MAFLD"
label(mafld_mace$toa_statin) <- "Đang dùng statin"
label(mafld_mace$ldlhdl_cat) <- "Tỷ số LDL/HDL (cắt 2.5)"
label(mafld_mace$maceg) <- "Biến cố MACE"
# Khai báo phân bố dữ liệu cho rms
dd <- datadist(mafld_mace)
options(datadist = "dd")
# Mô hình đúng như bạn đã dùng:
fit2 <- lrm(
maceg ~ multisteno + mafld + toa_statin + ldlhdl_cat,
data = mafld_mace,
x = TRUE, y = TRUE
)
print(fit2)
## Logistic Regression Model
##
## lrm(formula = maceg ~ multisteno + mafld + toa_statin + ldlhdl_cat,
## data = mafld_mace, x = TRUE, y = TRUE)
##
## Model Likelihood Discrimination Rank Discrim.
## Ratio Test Indexes Indexes
## Obs 388 LR chi2 51.00 R2 0.170 C 0.706
## 0 256 d.f. 4 R2(4,388)0.114 Dxy 0.413
## 1 132 Pr(> chi2) <0.0001 R2(4,261.3)0.165 gamma 0.447
## max |deriv| 3e-09 Brier 0.195 tau-a 0.186
##
## Coef S.E. Wald Z Pr(>|Z|)
## Intercept -1.1259 0.3262 -3.45 0.0006
## multisteno=Có 1.0322 0.2360 4.37 <0.0001
## mafld=Có 0.8533 0.2340 3.65 0.0003
## toa_statin=Có -1.1025 0.2720 -4.05 <0.0001
## ldlhdl_cat=≥2.5 0.4559 0.2394 1.90 0.0569
# nomogram sẽ nhận linear predictor và chuyển bằng plogis -> xác suất
nom2 <- nomogram(
fit2,
fun = list("Xác suất MACE" = plogis),
fun.at = seq(0.05, 0.9, by = 0.05), # các mốc xác suất cần hiển thị
lp = TRUE # hiển thị thêm thang LP (tuỳ chọn)
)
# Hiển thị trên R plotting device
plot(nom2, xfrac = 0.5) # xfrac điều chỉnh khoảng trống nhãn

# Lưu ra PDF (tuỳ chọn)
pdf("nomogram_model2.pdf", width = 10, height = 7)
plot(nom2, xfrac = 0.5)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Hẹp nhiều nhánh' in 'mbcsToSbcs': for ẹ
## (U+1EB9)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Hẹp nhiều nhánh' in 'mbcsToSbcs': for ề
## (U+1EC1)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Đang dùng statin' in 'mbcsToSbcs': for Đ
## (U+0110)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Tỷ số LDL/HDL (cắt 2.5)' in 'mbcsToSbcs':
## for ỷ (U+1EF7)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Tỷ số LDL/HDL (cắt 2.5)' in 'mbcsToSbcs':
## for ố (U+1ED1)
## Warning in text.default(xl, y, paste(strgraphwrap(ns[[i]], abs(xl), cex =
## cex.var), : conversion failure on 'Tỷ số LDL/HDL (cắt 2.5)' in 'mbcsToSbcs':
## for ắ (U+1EAF)
## Warning in axis(..., cex.axis = cex): for '≥2.5' in 'mbcsToSbcs': >=
## substituted for ≥ (U+2265)
## Warning in text.default(xl, y, funlabel[i], adj = 0, cex = cex.var): conversion
## failure on 'Xác suất MACE' in 'mbcsToSbcs': for ấ (U+1EA5)
dev.off()
## quartz_off_screen
## 2