R语言复杂抽样调查数据统计描述和分析

gtsummary包中tbl_svysummary提供了统计描述;tableone包中的svyCreateTableOne提供了统计比较;原始描述和比较可以是有table1包。

#测试数据
library(survey)
setwd("F://")
data(Titanic)
sur_des<-survey::svydesign(~1, data = as.data.frame(Titanic), weights = ~Freq)
str(Titanic)

#1 使用gtsummary包
library(gtsummary)
tabl1<-tbl_svysummary(data=sur_des,by = Survived, percent = "row",
                      statistic=list(all_continuous() ~ "{median} ({p25}, {p75})", all_categorical() ~ "{n} ({p}%)"))

#2 使用tableone包
library(tableone)
tabl2 <- svyCreateTableOne(vars = c("Age","Sex"),
                          strata = "Survived", data = sur_des,
                          factorVars = c("Age","Sex"))

 

 借鉴既往已发表的SCI:

1、部分研究曾使用过svyCreateTableOne

【1】Rosenbloom JM, Burns SM, Kim E, August DA, Ortiz VE, Houle TT. Race/Ethnicity and Sex and Opioid Administration in the Emergency Room. Anesth Analg. 2019 May;128(5):1005-1012. doi: 10.1213/ANE.0000000000003517. PMID: 29863607; PMCID: PMC6611165.

Based on our a priori inclusion/exclusion criteria, a weighted sample of 553 patients representing a total of 2,622,926 patients was included, composed of 1,858,035 (70.8%) females and 1,535,794 (58.6%) Caucasian non-Hispanics. The average age was 33.3 (standard deviation = 11.4) years and 170,975 (6.5 %) cases were emergent. The sample included patients from all 4 geographical regions in the United States and 44.0% patients had private insurance (Table 1; Supplemental Digital Content 1, Table, http://links.lww.com/AA/C432). Overall, 61.4% of patients received opioids (Table 2).

【2】Inoue K, Seeman TE, Nianogo R, Okubo Y. The effect of poverty on the relationship between household education levels and obesity in U.S. children and adolescents: an observational study. Lancet Reg Health Am. 2023. 25: 100565.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值