powered by
Compare a sample proportion to a population proportion
single_prop( dataset, var, lev = "", comp_value = 0.5, alternative = "two.sided", conf_lev = 0.95, test = "binom", data_filter = "", envir = parent.frame() )
A list of variables used in single_prop as an object of class single_prop
Dataset
The variable selected for the proportion comparison
The factor level selected for the proportion comparison
Population value to compare to the sample proportion
The alternative hypothesis ("two.sided", "greater", or "less")
Span of the confidence interval
bionomial exact test ("binom") or Z-test ("z")
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/single_prop.html for an example in Radiant
summary.single_prop to summarize the results
summary.single_prop
plot.single_prop to plot the results
plot.single_prop
single_prop(titanic, "survived") %>% str() single_prop(titanic, "survived", lev = "Yes", comp_value = 0.5, alternative = "less") %>% str()
Run the code above in your browser using DataLab