Learn R Programming

robCompositions (version 2.4.1)

pTab: Propability table

Description

Calculates the propability table using different methods

Usage

pTab(x, method = "dirichlet", alpha = 1/length(as.numeric(x)))

Value

The probablity table

Arguments

x

an object of class table

method

default is ‘dirichlet’. Other available methods: ‘classical’ that is function prop.table() from package base or method “half” that add 1/2 to each cell to avoid zero problems.

alpha

constant used for method ‘dirichlet’

Author

Matthias Templ

References

Egozcue, J.J., Pawlowsky-Glahn, V., Templ, M., Hron, K. (2015) Independence in contingency tables using simplicial geometry. Communications in Statistics - Theory and Methods, 44 (18), 3978--3996.

Examples

Run this code
data(precipitation) 
pTab(precipitation)
pTab(precipitation, method = "dirichlet")

Run the code above in your browser using DataLab