Learn R Programming

imputeMulti (version 0.8.4)

multinomial_stats: Multinomial Sufficient Statistics

Description

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

Usage

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

Value

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

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.

Examples

Run this code
if (FALSE) {
 data(tract2221)
 obs_suff_stats <- multinomial_stats(tract2221, output= "x_y")
 marg_obs_suff_stats <- multinomial_stats(tract2221, output= "z_Os_y")
}

Run the code above in your browser using DataLab