data('api', package = 'survey')
apisrs %>%
as_survey_design(.ids = 1) %>%
summarize(api_corr = survey_corr(x = api00, y = api99))
apisrs %>%
as_survey_design(.ids = 1) %>%
group_by(sch.wide) %>%
summarize(
api_emer_corr = survey_corr(x = api00, y = emer, na.rm=TRUE, vartype="ci")
)
Run the code above in your browser using DataLab