ldexp: Exponential Distribution: log-density

Description Usage Arguments Value Author(s) Examples

Description

Considering an Exponential Distribution calculates the log-density

ld = log(λ) - λ * y; y ≥ 0

Usage

1
2
3
4
5
6
7
## S3 method for class 'modello_number'
ldexp(y, lam)

## Default S3 method:
ldexp(y, lam)

ldexp(y, lam)

Arguments

y

observations, numeric or reference object of class 'number'

lam

rate parameter, numeric of reference object of class 'number'

Value

Returns a 'numeric' or a reference object of class 'number'

Author(s)

Filippo Monari

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
modello.init(10, 10, 10, 10)
## For modello_numbers
y = number(rexp(10))
ld = ldexp(y, .k(1))
print(ld)
print(ld$v)
modello.close()
## For numerics
y = rexp(10)
ld = ldexp(y, 1)
print(ld)

modello documentation built on Feb. 2, 2021, 9:06 a.m.

Related to ldexp in modello...