analyze_cat | R Documentation |
Given categorical data and the weights for the individual observations, calculate estimated proportions by category and Goodman's multinomial confidence intervals.
analyze_cat(
data,
weights,
id_var,
cat_var,
wgt_var,
definitions = NULL,
conf = 80,
verbose = FALSE
)
data |
Data frame. Categorical data with the unique identifiers for each observation/row in the variable |
weights |
Data frame. This must contain the weighting information using the variables |
id_var |
Character string. The name of the variable in |
cat_var |
Character string. The name of the variable in |
wgt_var |
Character string. The name of the variable in |
definitions |
Conditionally optional character vector. The possible categories that the observation could've been classed into. This is NOT optional if there are categories that do not appear in |
conf |
Numeric. The confidence level in percent. Defaults to |
verbose |
Logical. If |
A data frame containing the categories, counts of observations, weighted estimated proportions, and confidence intervals.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.