| callmultmoments | R Documentation |
Computes a multivariate normal moment by initializing variables, calling
multmoments, and constructing output.
callmultmoments(moment)
moment |
A vector |
Each row of the representation gives the exponents for a single
product of covariance terms. For example, (1, 2, 0) represents
S_{11}^1 S_{12}^2 S_{22}^0, where the S_{ij} are the covariances.
The full moment is the sum of these terms multiplied by their respective
coefficients. If the sum of the exponents is odd, the moment is 0.
An object of class 'moment', which is a list with three
components:
moment: The input moment vector.
representation: A matrix containing the representation in
terms of upper-triangular matrices.
coefficients: The coefficients corresponding to the rows of
the representation.
If the sum of the exponents is odd, returns -1 and prints
"Sum of powers is odd. Moment is 0."
If any exponent is negative, returns -2 and prints
"All components of the moment must be non-negative."
If any exponent is not an integer, returns -3 and prints
"All components of the moment must be integers."
Kem Phillips kemphillips@comcast.net
Phillips2010symmoments
multmoments, and the methods toLatex,
evaluate, and simulate in the symmoments
package.
# Compute the moment for the 4-dimensional moment c(1,2,3,4):
m.1234 <- callmultmoments(c(1, 2, 3, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.