dMGF | R Documentation |
Get the polynomial term in the expression of derivatives of moment
generating function of N_p(0, I_p)
, with
respect to a given component and its exponent. Up to eighth order.
dMGF(tab, t, coef = TRUE)
tab |
a dataframe with the first column contain indices of components
of a multivariate random vector |
t |
vector in |
coef |
take |
For a standard multivariate normal random variables Y \sim N_p(0, I_p)
\mathbb{E}\left(Y_1^{k_1} ... Y_p^{k_p} \exp(t'X)\right) =
\dfrac{\partial^{k_1}\dots
\partial^{k_p}}{t_1^{k_1} \dots t_p^{k_p}} \exp(t't/2) =
\mu^{(k_1)} (t_1) ... \mu^{(k_p)}(t_p) \exp(t't/2)
For example,
\mathbb{E}Y_2^4 \exp(t'Y) = \dfrac{\partial^4}{\partial t_2^4} \exp(t't/2)
= \mu^{(4)}(t_2) \exp(t't/2).
Value of derivatives.
#Calculation of above example
t <- rep(.2, 7)
tab <- data.frame(j = 2, exponent = 4)
dMGF(tab, t = t)
dMGF(tab, t = t, coef = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.