Weighted summary statistics

I have a general question about obtaining weighted summary statistics using R. I have used Stata in the past, and I could do the following in Stata:

summarize variable_list [aw=weight_variable]

This gives a table of summary statistics for variables in variable_list, with weight_variable used as the analytic weight (aw). This is pretty fast and convenient. My question is whether there is a similar function in R. I have tried to use the survey::svydesign and gtsummary::tbl_svysummary functions (as in here Create a table of summary statistics from a survey object — tbl_svysummary • gtsummary) but haven't been able to produce the desired output. One problem is doing so somehow increased memory usage by A LOT and the process would just stop on its own. Any help would be greatly appreciated. Thanks in advance!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.