iwishmom function

Expectation of a Matrix-valued Function of an Inverse beta-Wishart Distribution

Expectation of a Matrix-valued Function of an Inverse beta-Wishart Distribution

When iw = 0, the function calculates E[j=1r\mboxtr(Wj)fj]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}], where WWmβ(n,S)W \sim W_m^{\beta}(n, S). When iw != 0, the function calculates E[j=1r\mboxtr(Wj)fjWiw]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}W^{-iw}].

iwishmom(n, S, f, iw = 0, alpha = 2)

Arguments

  • n: The degrees of freedom of the beta-Wishart matrix WW

  • S: The covariance matrix of the beta-Wishart matrix WW

  • f: A vector of nonnegative integers fjf_j that represents the power of \mboxtr(Wj)\mbox{tr}(W^{-j}), where j=1,,rj=1, \ldots, r

  • iw: The power of the inverse beta-Wishart matrix W1W^{-1} (0 by default)

  • alpha: The type of Wishart distribution (α=2/β)(\alpha=2/\beta):

    • 1/2: Quaternion Wishart
    • 1: Complex Wishart
    • 2: Real Wishart (default)

Returns

When iw = 0, it returns E[j=1r\mboxtr(Wj)fj]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}]. When iw != 0, it returns E[j=1r\mboxtr(Wj)fjWiw]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}W^{-iw}].

Examples

# Example 1: For E[tr(W^{-1})^2] with W ~ W_m^1(n,S), # where n and S are defined below: n <- 20 S <- matrix(c(25, 49, 49, 109), nrow=2, ncol=2) iwishmom(n, S, 2) # iw = 0, for real Wishart distribution # Example 2: For E[tr(W^{-1})^2*tr(W^{-3})W^{-2}] with W ~ W_m^1(n,S), # where n and S are defined below: n <- 20 S <- matrix(c(25, 49, 49, 109), nrow=2, ncol=2) iwishmom(n, S, c(2, 0, 1), 2, 2) # iw = 2, for real Wishart distribution # Example 3: For E[tr(W^{-1})^2*tr(W^{-3})] with W ~ W_m^2(n,S), # where n and S are defined below: # Hermitian S for the complex case n <- 20 S <- matrix(c(25, 49 + 2i, 49 - 2i, 109), nrow=2, ncol=2) iwishmom(n, S, c(2, 0, 1), 0, 1) # iw = 0, for complex Wishart distribution # Example 4: For E[tr(W^{-1})*tr(W^{-2})^2*tr(W^{-3})^2*W^{-1}] with W ~ W_m^2(n,S), # where n and S are defined below: n <- 30 S <- matrix(c(25, 49 + 2i, 49 - 2i, 109), nrow=2, ncol=2) iwishmom(n, S, c(1, 2, 2), 1, 1) # iw = 1, for complex Wishart distribution
  • Maintainer: Raymond Kan
  • License: MIT + file LICENSE
  • Last published: 2024-08-27

Useful links