当前位置: 首页 > article >正文

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.


http://www.kler.cn/news/356452.html

相关文章:

  • Vue-admin-box后台管理框架
  • Leetcode 1 的位数
  • 文字跑马灯:实现文字自动滚动策略的原理分析
  • TwinCAT3添加NC轴
  • Text2Video Huggingface Pipeline 文生视频接口和文生视频论文API
  • 【微服务】微服务发现详解:构建高效分布式系统的关键
  • c# 里list和array的应用比较说明
  • SwanLab VSCode插件已发布,附使用教程
  • 不做邮箱投稿的奴隶,要做单位信息宣传考核计分投稿的主人
  • SpringBoot智慧外贸平台
  • 大数据-173 Elasticsearch 索引操作 增删改查 详细 JSON 操作
  • Java - SpringMVC
  • 反走样算法(MSAA、TAA、FXAA、DLSS)
  • HBASE介绍和使用
  • 计算机视觉中的最小二乘法:寻找完美交点和直线拟合
  • Unity Apple Vision Pro 保姆级开发教程-准备阶段
  • 基于langchain.js快速搭建AI-Agent
  • Mybatis Plus 查看组装的SQL条件的办法
  • 叉车安全防撞装置的作用
  • Spark任务OOM问题如何解决?