Description Usage Arguments Details Value Note References Examples
Evaluates a truncated hypergeometric function of a matrix argument.
1 | hypergeomPFQ(m, a, b, x, alpha = 2)
|
m |
truncation weight of the summation, a positive integer |
a |
the "upper" parameters, a numeric vector,
possibly empty (or |
b |
the "lower" parameters, a numeric vector,
possibly empty (or |
x |
either a real or complex square matrix with real eigenvalues, or a numeric vector, the eigenvalues of the matrix |
alpha |
the alpha parameter, a positive number |
This is an implementation of Koev & Edelman's algorithm
(see the reference). This algorithm is split into two parts: the case of
a scalar matrix (multiple of an identity matrix) and the general case.
The case of a scalar matrix is much faster (try e.g. x = c(1,1,1)
vs
x = c(1,1,0.999)
).
A real number.
The hypergeometric function of a matrix argument is usually defined for a symmetric real matrix or a Hermitian complex matrix.
Plamen Koev and Alan Edelman. The Efficient Evaluation of the Hypergeometric Function of a Matrix Argument. Mathematics of Computation, 75, 833-846, 2006.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # a scalar x example, the Gauss hypergeometric function
hypergeomPFQ(m = 20, a = c(1,2), b = c(3), x = 0.5)
gsl::hyperg_2F1(1, 2, 3, 0.5)
# 0F0 is the exponential of the trace
X <- toeplitz(c(3,2,1))/10
hypergeomPFQ(m = 10, a = NULL, b = NULL, x = X)
exp(sum(diag(X)))
# 1F0 is det(I-X)^(-a)
X <- toeplitz(c(3,2,1))/100
hypergeomPFQ(m = 15, a = 3, b = NULL, x = X)
det(diag(3)-X)^(-3)
# Herz's relation for 1F1
hypergeomPFQ(m=15, a = 2, b = 3, x = X)
exp(sum(diag(X))) * hypergeomPFQ(m=15, a = 3-2, b = 3, x = -X)
# Herz's relation for 2F1
hypergeomPFQ(15, a = c(1,2), b = 3, x = X)
det(diag(3)-X)^(-2) *
hypergeomPFQ(15, a = c(3-1,2), b = 3, -X%*%solve(diag(3)-X))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.