| evaluate_noncentral | R Documentation |
Computes the numerical value of a non-central moment at a specified mean and specified covariance matrix.
evaluate_noncentral(moment, mu, sigma, envir = "symmoments")
moment |
A vector of non-negative integers representing the
non-central moment to be evaluated: |
mu |
A vector of real numbers representing the mean vector |
sigma |
An upper-triangular matrix of covariance terms for the multivariate normal distribution, expressed as a vector stacked by row, at which the moment is to be evaluated. |
envir |
A character string specifying the environment containing the
central moments needed for the calculation. Defaults to |
This function searches the environment specified in the envir
argument for the central moments required to complete the non-central expansion.
The default is the symmoments environment. All even central moments
less than or equal to the requested moment vector must be present.
The computation will stop with an error message if any required central moment
is missing from envir.
The numeric value of the non-central moment evaluated at the specified mean and covariance matrix.
Kem Phillips kemphillips@comcast.net
Phillips2010symmoments
evaluate.moment, make.all.moments
## Not run:
# Evaluates the expected value of X1^3 X2 X3^2 at mean c(3,4,1)
# and at the following covariance matrix:
# 4 2 1
# 2 3 1
# 1 1 2
# Note: requires all central moments up to c(3,1,2) to exist in 'symmoments'.
# If needed, run: make.all.moments(c(3,1,2))
evaluate_noncentral(c(3, 1, 2), c(3, 4, 1), c(4, 2, 1, 3, 1, 2))
# Using central moments stored instead in the global environment:
evaluate_noncentral(c(3, 1, 2), c(3, 4, 1), c(4, 2, 1, 3, 1, 2), '.GlobalEnv')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.