analyze_cat_multi | R Documentation |
Given categorical data, subsetting information, and the weights for the individual observations, calculate estimated proportions by category and Goodman's multinomial confidence intervals for each subset. This can be done with data without subsetting by not providing values for split_vars
. An example of using split_vars
would be if the data ratings of indicators where the indicators each need to be estimated separately and the indicator information is stored in data$indicator
in which case you would use split_var = "indicator"
. If indicators appear more than once with different ratings because there were different criteria for different objectives and the objective was stored in data$objective
then you would use split_vars = c("indicator", "objective")
.
analyze_cat_multi(
data,
weights,
id_var,
cat_var,
wgt_var,
split_vars = NULL,
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 |
split_vars |
Optional character vector. One or more character strings corresponding to variable names in |
definitions |
Optional data frame. The possible categories for the observations to be classed into, which may include 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. If subset using split_vars
then all those variables will be included and the estimates will be per unique combination of values within those variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.