entropy: Calculate entropy of discrete distribution

View source: R/entropy.R

entropyR Documentation

Calculate entropy of discrete distribution

Description

Calculate entropy of discrete distribution

Usage

entropy(p, ...)

## Default S3 method:
entropy(p, ...)

## S3 method for class 'array'
entropy(p, margin, ...)

## S3 method for class 'tables'
entropy(p, margin, ...)

Arguments

p

non-negative numeric vector

...

other arguments to methods

margin

margin to consider

Value

A numeric value of the entopy, or vector of entropies.

Methods (by class)

  • entropy(default): Default method for vectors

  • entropy(array): Method for arrays

  • entropy(tables): Method for tables object


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