powered by
Compare sample proportions across groups
compare_props( dataset, var1, var2, levs = "", alternative = "two.sided", conf_lev = 0.95, comb = "", adjust = "none", data_filter = "", envir = parent.frame() )
A list of all variables defined in the function as an object of class compare_props
Dataset
A grouping variable to split the data for comparisons
The variable to calculate proportions for
The factor level selected for the proportion comparison
The alternative hypothesis ("two.sided", "greater" or "less")
Span of the confidence interval
Combinations to evaluate
Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni)
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")
Environment to extract data from
See https://radiant-rstats.github.io/docs/basics/compare_props.html for an example in Radiant
summary.compare_props to summarize results
summary.compare_props
plot.compare_props to plot results
plot.compare_props
compare_props(titanic, "pclass", "survived") %>% str()
Run the code above in your browser using DataLab