0.917370028585327,0.897412512251031,1.06634082743438,0.94432371066466,0.526887241987567,0.526887241987567,0.546578869586901,0.283198307048893,0.494322145606406)),row.names=c(NA,10L),class="data.frame")dat_svy<-dat_dput|>srvyr::as_survey_design
本文将详细解析tbl_svysummary所使用的统计方法,并通过步骤进行详细说明。 一、引言 在社会科学、公共卫生、市场研究等领域,我们经常需要处理来自复杂抽样设计的数据。这些数据的分析不能简单地使用常规的描述性统计方法,因为它们需要考虑到样本权重、集群效应、分层结构等因素。R语言的survey包为此提供了一系列强大的工具...
在tbl_svysummary函数中,常用的统计方法包括: 1.描述性统计:计算表格中的频数、比例、均值、标准差、最小值、最大值等基本统计量。 2.列统计:对表格中的某一列进行统计分析,如计算均值、标准差、最小值、最大值等。 3.行统计:对表格中的某一行进行统计分析,如计算总和、平均值等。 4.交叉表:计算两个分类...
Other tbl_svysummary tools:add_n.tbl_summary(),add_overall(),add_p.tbl_svysummary(),add_q(),add_stat_label(),modify,tbl_merge(),tbl_svysummary() Other tbl_regression tools:add_global_p(),add_q(),bold_italicize_labels_levels,combine_terms(),inline_text.tbl_regression(),modify,tbl_...
To compare two or more groups, include [`add_p()`](https://www.danieldsjoberg.com/gtsummary/reference/add_p.html) with the function call, which detects variable type and uses an appropriate statistical test. ```{r} trial2 |> tbl_summary(by = trt) |> add_p() ``` ## Customize ...
add_p()add p-values to the output comparing values across groups add_overall()add a column with overall summary statistics add_n()add a column with N (or N missing) for each variable add_difference()add column for difference between two group, confidence interval, and p-value ...
1.1 tbl_svysummary函数的作用 tbl_svysummary函数主要用于对调查数据进行汇总和统计分析。它可以对数据集中的各个变量进行描述性统计,如均值、标准差、中位数等。它还可以进行基于样本设计的推断统计分析,如置信区间估计、假设检验等。 1.2 tbl_svysummary函数的实现原理 tbl_svysummary函数的实现原理主要包括两个方面...
方案 在一个新的 R 会话中使用 search() 可以查看默认加载的包。 search() #> [1] ".GlobalEnv...
tbl_summary() Basic code trial %>% select(trt,age,grade,response))%>% tbl_summary() Basic table tbl_svysummary() for survey objects Same functionality as tbl_summary(), but takes a survey object as input, and accounts for survey weights and design. More info at: http://www.danield...