文章预览
代码目录 # 0.load packages --------------------------------------------------------- library(rrtable) library(moonBook) library(lme4) library(broom) library(here) library(survival) library(survminer) library(openxlsx) library(tidyverse) library(gtsummary) library(ggpubr) library(ggstatsplot) library(rms) library(Publish) library(autoReg) library(tidycmprsk) library(finalfit) 1.利用gtsummary进行多因素分析并返回整洁结果 # 1. 利用gtsummary进行多因素分析并返回整洁结果---------------------------------------------------------------------- # 官网教程:https://www.danieldsjoberg.com/gtsummary/articles/tbl_regression.html #清空环境变量并加载数据 rm(list = ls()) load( "colon_tidydata.Rdata" ) # names(df) #普通逻辑回归多因素分析 #构建逻辑回归方程 lostic_gtsummary glm(status ~ differ + age, data = df, family = binomial) lostic_gtsummary lostic_gtsummary |> tbl_regr
………………………………