propCoin {netCoin}R Documentation

Express Coin Entries as Fraction of Marginal Table

Description

This is like 'prop.table' for 'coin' objects.

Usage

propCoin(x, margin= 0, decimals=1)

Arguments

x

'coin' object.

margin

index, or vector of indices to generate margin for.

decimals

integer indicating the number of decimal places to be used.

Value

Table like 'x' expressed relative to 'margin'.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## Random incidence matrix: 25 scenarios, 4 events.
I <- matrix(rbinom(100, 1, .5), nrow = 25, ncol = 4,
            dimnames = list(NULL, c("A", "B", "C", "D")))
C <- coin(I, sort = TRUE)

propCoin(C, 1)

[Package netCoin version 2.0.48 Index]