iwishmom_sym function

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

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

When iw = 0, the function returns an analytical expression of 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 returns an analytical expression of E[j=1r\mboxtr(Wj)fjWiw]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}W^{-iw}]. For a given f, iw, and alpha, this function provides the aforementioned expectations in terms of the variables n~\tilde{n} and Σ\Sigma.

iwishmom_sym(f, iw = 0, alpha = 2, latex = FALSE)

Arguments

  • 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)
  • latex: A Boolean indicating whether the output will be a LaTeX string or dataframe (FALSE by default)

Returns

When iw = 0, it returns an analytical expression of E[j=1r\mboxtr(Wj)fj]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}]. When iw != 0, it returns an analytical expression of E[j=1r\mboxtr(Wj)fjWiw]E[\prod_{j=1}^r \mbox{tr}(W^{-j})^{f_j}W^{-iw}]. If latex = FALSE, the output is a data frame that stores the coefficients for calculating the result. If latex = TRUE, the output is a LaTeX formatted string of the result in terms of n~\tilde{n} and Σ\Sigma.

Examples

# Example 1: For E[tr(W^{-1})^4] with W ~ W_m^1(n,Sigma), represented as a dataframe: iwishmom_sym(4) # iw = 0, for real Wishart distribution # Example 2: For E[tr(W^{-1})*tr(W^{-2})W^{-1}] with W ~ W_m^1(n,S), represented as a dataframe: iwishmom_sym(c(1, 1), 1) # iw = 1, for real Wishart distribution # Example 3: For E[tr(W^{-1})^4] with W ~ W_m^2(n,S), represented as a LaTeX string: # Using writeLines() to format writeLines(iwishmom_sym(4, 0, 1, latex=TRUE)) # iw = 0, for complex Wishart distribution # Example 4: For E[tr(W^{-1})*tr(W^{-2})W^{-1}] with W ~ W_m^2(n,S), represented as a LaTeX string: # Using writeLines() to format writeLines(iwishmom_sym(c(1, 1), 1, 1, latex=TRUE)) # iw = 1, for real Wishart distribution
  • Maintainer: Raymond Kan
  • License: MIT + file LICENSE
  • Last published: 2024-08-27

Useful links