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