Compare a sample proportion to a population proportion

Description

Compare a sample proportion to a population proportion

Usage

1
2
single_prop(dataset, var, lev = "", comp_value = 0.5,
  alternative = "two.sided", conf_lev = 0.95, data_filter = "")

Arguments

dataset

Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant

var

The variable selected for the proportion comparison

lev

The factor level selected for the proportion comparison

comp_value

Population value to compare to the sample proportion

alternative

The alternative hypothesis ("two.sided", "greater", or "less")

conf_lev

Span of the confidence interval

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")

Details

See https://radiant-rstats.github.io/docs/basics/single_prop.html for an example in Radiant

Value

A list of variables used in single_prop as an object of class single_prop

See Also

summary.single_prop to summarize the results

plot.single_prop to plot the results

Examples

1
2
result <- single_prop("diamonds","cut")
result <- single_prop("diamonds","clarity", lev = "IF", comp_value = 0.05)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.