# Example 1: For E[tr(W)^4] with W ~ W_m^1(n,Sigma), represented as a dataframe:
wishmom_sym(4) # iw = 0, for real Wishart distribution
# Example 2: For E[tr(W)*tr(W^2)W] with W ~ W_m^1(n,S), represented as a dataframe:
wishmom_sym(c(1, 1), 1) # iw = 1, for real Wishart distribution
# Example 3: For E[tr(W)^4] with W ~ W_m^2(n,S), represented as a LaTeX string:
# Using writeLines() to format
writeLines(wishmom_sym(4, 0, 1, latex=TRUE)) # iw = 0, for complex Wishart distribution
# Example 4: For E[tr(W)*tr(W^2)W] with W ~ W_m^2(n,S), represented as a LaTeX string:
# Using writeLines() to format
writeLines(wishmom_sym(c(1, 1), 1, 1, latex=TRUE)) # iw = 1, for real Wishart distribution
Run the code above in your browser using DataLab