esoph 分层病例对照：分组二项回归
生成于脚本 02_analysis.R；R R version 4.3.3 (2024-02-29)

原始统计单位：病例数 / 对照数（人）；年龄分层（岁）；酒精（g/day）；吸烟（g/day）
参照类别：年龄 25-34；酒精 0-39g/day；吸烟 0-9g/day
主暴露：日均酒精 >= 80 g/day（80-119 与 120+ 合并）vs < 80 g/day
注意：截距受病例:对照抽样比影响，不能解释为发病风险或发病率；斜率给出 OR。
零病例层 = 29；零对照层 = 12（这些层的病例占比为 0 或 1，只反映抽样）
Pearson 离散度（主分析模型）= 2.097，残差自由度 = 78

== 模型 1：粗（仅暴露） ==

Call:
glm(formula = cbind(n_cases, n_controls) ~ exposure, family = binomial, 
    data = d)

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -1.8569     0.1054 -17.612   <2e-16 ***
exposure      1.7299     0.1752   9.872   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 367.95  on 87  degrees of freedom
Residual deviance: 271.52  on 86  degrees of freedom
AIC: 390.58

Number of Fisher Scoring iterations: 5


== 模型 2：调整年龄层 ==

Call:
glm(formula = cbind(n_cases, n_controls) ~ exposure + age_group, 
    family = binomial, data = d)

Coefficients:
               Estimate Std. Error z value Pr(>|z|)    
(Intercept)     -5.0543     1.0094  -5.007 5.53e-07 ***
exposure         1.6699     0.1896   8.807  < 2e-16 ***
age_group35-44   1.5423     1.0659   1.447 0.147917    
age_group45-54   3.1988     1.0232   3.126 0.001770 ** 
age_group55-64   3.7135     1.0185   3.646 0.000266 ***
age_group65-74   3.9669     1.0231   3.877 0.000106 ***
age_group75+     3.9622     1.0650   3.720 0.000199 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 367.95  on 87  degrees of freedom
Residual deviance: 167.39  on 81  degrees of freedom
AIC: 296.44

Number of Fisher Scoring iterations: 6


== 模型 3：主分析，调整年龄层 + 吸烟层 ==

Call:
glm(formula = cbind(n_cases, n_controls) ~ exposure + age_group + 
    tobacco_g_day, family = binomial, data = d)

Coefficients:
                   Estimate Std. Error z value Pr(>|z|)    
(Intercept)         -5.7342     1.0356  -5.537 3.08e-08 ***
exposure             1.6251     0.1951   8.331  < 2e-16 ***
age_group35-44       1.8080     1.0788   1.676 0.093751 .  
age_group45-54       3.4600     1.0385   3.332 0.000863 ***
age_group55-64       4.0058     1.0349   3.871 0.000108 ***
age_group65-74       4.4173     1.0430   4.235 2.29e-05 ***
age_group75+         4.3062     1.0827   3.977 6.98e-05 ***
tobacco_g_day10-19   0.4308     0.2193   1.965 0.049440 *  
tobacco_g_day20-29   0.6872     0.2631   2.612 0.009007 ** 
tobacco_g_day30+     1.6352     0.3234   5.056 4.29e-07 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 367.95  on 87  degrees of freedom
Residual deviance: 139.38  on 78  degrees of freedom
AIC: 274.44

Number of Fisher Scoring iterations: 6


== 模型 4：酒精四分类 + 年龄 + 吸烟 ==

Call:
glm(formula = cbind(n_cases, n_controls) ~ alcohol_g_day + age_group + 
    tobacco_g_day, family = binomial, data = d)

Coefficients:
                    Estimate Std. Error z value Pr(>|z|)    
(Intercept)          -6.8954     1.0859  -6.350 2.16e-10 ***
alcohol_g_day40-79    1.4346     0.2501   5.737 9.63e-09 ***
alcohol_g_day80-119   1.9807     0.2848   6.956 3.51e-12 ***
alcohol_g_day120+     3.6029     0.3850   9.357  < 2e-16 ***
age_group35-44        1.9809     1.1041   1.794 0.072786 .  
age_group45-54        3.7763     1.0680   3.536 0.000407 ***
age_group55-64        4.3352     1.0650   4.070 4.69e-05 ***
age_group65-74        4.8964     1.0764   4.549 5.39e-06 ***
age_group75+          4.8265     1.1213   4.304 1.67e-05 ***
tobacco_g_day10-19    0.4381     0.2283   1.919 0.055039 .  
tobacco_g_day20-29    0.5126     0.2730   1.878 0.060398 .  
tobacco_g_day30+      1.6410     0.3441   4.769 1.85e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 367.953  on 87  degrees of freedom
Residual deviance:  82.337  on 76  degrees of freedom
AIC: 221.39

Number of Fisher Scoring iterations: 6


== 模型 5：quasi-binomial 敏感性分析 ==

Call:
glm(formula = cbind(n_cases, n_controls) ~ exposure + age_group + 
    tobacco_g_day, family = quasibinomial, data = d)

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)         -5.7342     1.4998  -3.823 0.000263 ***
exposure             1.6251     0.2825   5.753 1.64e-07 ***
age_group35-44       1.8080     1.5623   1.157 0.250695    
age_group45-54       3.4600     1.5039   2.301 0.024082 *  
age_group55-64       4.0058     1.4987   2.673 0.009154 ** 
age_group65-74       4.4173     1.5105   2.924 0.004517 ** 
age_group75+         4.3062     1.5680   2.746 0.007481 ** 
tobacco_g_day10-19   0.4308     0.3176   1.357 0.178786    
tobacco_g_day20-29   0.6872     0.3810   1.803 0.075174 .  
tobacco_g_day30+     1.6352     0.4684   3.491 0.000795 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for quasibinomial family taken to be 2.097244)

    Null deviance: 367.95  on 87  degrees of freedom
Residual deviance: 139.38  on 78  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 6


== 分层 Mantel–Haenszel ==
层数（年龄 x 吸烟）= 24；用于汇总 = 24；空层剔除 = 0
OR_MH = 4.876985；95%CI = (3.322876, 7.157952)
