enttn: Truncated Normal Distribution Entropy

Description Usage Arguments Value Author(s) Examples

View source: R/enttn.R

Description

Calculate entropy of Truncated Normal distributions

Usage

1
2
enttn(.mean = rep(0, 1), .sd = rep(1, length(.mean)), .low = rep(-Inf,
  length(.mean)), .high = rep(Inf, length(.mean)))

Arguments

.mean

Length K vector with the means of the K Normal distributions prior to truncation

.sd

Length K vector with the standard deviations of the K Normal distributions prior to truncation

.low

Length K vector with the lower truncation bound of the K Normal distributions prior to truncation

.high

Length K vector with the upper truncation bound of the K Normal distributions prior to truncation

Value

Length K vector with the entropies associated with each of the K Truncated Normal distributions

Author(s)

Jonathan Olmsted

Examples

1
2
3
4
5
6
7
lows <- c(-1, 5, -100, 4, 4, -100, 7)
highs <- c(1, 100, 10, 7, 4.1, 100, 100)
enttn(.mean = rep(0, length(lows)),
      .sd = rep(1, length(lows)),
      .low = lows,
      .high = highs
      )

RcppTN documentation built on May 2, 2019, 8:54 a.m.

Related to enttn in RcppTN...