margin: Get margin of a table or tables

View source: R/margin.R

marginR Documentation

Get margin of a table or tables

Description

Get margin of a table or tables

Usage

margin(x, ...)

margin2(x, ...)

conditional(x, ...)

conditional2(x, ...)

intervention(x, ...)

Arguments

x

a contingency table or tables object

...

other arguments, not currently used

Details

margin2 keeps all dimensions, and hence results will sum to the original sum, times the number of cells summed over.

Value

an object of the same class as x. The resulting array, or collection of tables, will contain a marginal, conditional or interventional distribution.

Functions

  • margin2(): keep all dimensions

  • conditional(): conditional distributions

  • conditional2(): conditional distributions with all dimensions kept

  • intervention(): interventional distributions


rje42/contingency documentation built on Sept. 9, 2024, 6:32 p.m.