goodness: Evaluate if sample data for a categorical variable is...

Description Usage Arguments Details Value See Also Examples

View source: R/goodness.R

Description

Evaluate if sample data for a categorical variable is consistent with a hypothesized distribution

Usage

1
goodness(dataset, var, p = NULL, tab = NULL, data_filter = "")

Arguments

dataset

Dataset

var

A categorical variable

p

Hypothesized distribution as a number, fraction, or numeric vector. If unspecified, defaults to an even distribution

tab

Table with frequencies as alternative to dataset

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/goodness.html for an example in Radiant

Value

A list of all variables used in goodness as an object of class goodness

See Also

summary.goodness to summarize results

plot.goodness to plot results

Examples

1
2
goodness(newspaper, "Income") %>% str()
table(select(newspaper, Income)) %>% goodness(tab = .)

radiant.basics documentation built on Oct. 6, 2018, 9:04 a.m.