Skip to content

Instantly share code, notes, and snippets.

@sethrubenstein
Created November 9, 2022 22:12
Show Gist options
  • Save sethrubenstein/907b09e5734f2524a03bac2ebb7951eb to your computer and use it in GitHub Desktop.
Save sethrubenstein/907b09e5734f2524a03bac2ebb7951eb to your computer and use it in GitHub Desktop.
Test
q1_by_sex = svyby(~q1, #variable to estimate
~sex, #subgroup variable
design = Apr17_design,
FUN = svymean, #function to use on each subgroup
keep.names = FALSE #does not include row.names
#for subgroup variable
)
knitr::kable(q1_by_sex, digits = 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment