summarize_survey: Summarize a survey data frame

Description Usage Arguments Details Value Examples

Description

Summarize a survey data frame

Usage

1
2
3
summarize_survey(mysurvey, response)

summarize_survey_(mysurvey, response_col)

Arguments

mysurvey

A survey data frame with post-stratification weights, such as those created by weight_wwc. There must be a column weight in the data frame.

response

A column in mysurvey that contains the quantity to be weighted, such as the response to a yes/no question as in simulate_survey

response_col

Response column as string

Details

summarize_survey is given bare names while summarize_survey_ is given strings and is therefore suitable for programming with.

Value

A data frame with 4 columns (answer, value, se, and result) that tabulates the weighted response on the survey question.

Examples

1
2
3
4
library(dplyr) 
data(texassurvey)
weight_wwc(texassurvey, sex, raceethnicity) %>%
    summarize_survey(response)

heathermkrause/WWC documentation built on May 17, 2019, 3:20 p.m.