Multinomial Sufficient Statistics

Share:

Description

Calculate observed-data sufficient statistics, marginally-observed summary statistics, or enumerate all possible observed patterns from a multivariate multinomial dataset.

Usage

1
multinomial_stats(dat, output = c("x_y", "z_Os_y", "possible.obs"))

Arguments

dat

A data.frame. All variables must be factors.

output

A string specifying the desired output. One of c("x_y", "z_Os_y", "possible.obs"). "x_y" indicates the observed-data sufficient statistics, "z_Os_y" indicates the marginally-observed summary statistics, and "possible.obs" indicates the possible observed patterns.

Value

A data.frame containing either sufficient statistics or possible observed patterns.

Examples

1
2
3
4
5
6
## Not run: 
 data(tract2221)
 obs_suff_stats <- multinomial_stats(tract2221, output= "x_y")
 marg_obs_suff_stats <- multinomial_stats(tract2221, output= "z_Os_y")

## End(Not run)