poch: Compute the Pochhammer Symbol (Rising Factorials) With...

View source: R/utility.R

pochR Documentation

Compute the Pochhammer Symbol (Rising Factorials) With Increment

Description

Compute the Pochhammer Symbol (Rising Factorials) With Increment

Usage

poch(x, y = NULL, n = 1, log = FALSE)

Arguments

x

Non-negative numeric value

y

Non-negative real value representing increment parameter for Pochhammer function. If NULL, there is no increment (i.e. y=1).

n

Non-negative integer representing subscript in Pochhammer symbol

log

Logical value indicating whether to return results on log scale

Value

A numeric value indicating the result of Pochhammer function.

Examples

# effect of increment parameter
poch(5, y = NULL, n = 3, log = FALSE)
poch(5, y = 1, n = 3, log = FALSE)
poch(5, y = 1:4, n = 3, log = FALSE)

# increment being NULL is equivalent to ratio of gamma functions
a <- 7
b <- 3
out1 <- poch(a, y = NULL, n = b, log = FALSE)
out2 <- gamma(a + b) / gamma(a)


sams documentation built on April 20, 2022, 1:06 a.m.

Related to poch in sams...