covZtZs {PlotNormTest} | R Documentation |
Covariance matrix of derivatives of sample moment generating function (MGF).
Description
Stacking derivatives upto the third/fourth orders of sample MGF
together to obtain a vector, which (under normality assumption) approaches
a multivariate normally distributed vector
with zero mean and a covariance matrix.
covZtZs
calculates covariance between any two points
t
and s
in \mathbb{R}^p
.
Usage
mt3_covZtZs(t, s, pos.matrix = NULL)
mt4_covZtZs(t, s, pos.matrix = NULL)
Arguments
t , s |
a vector of length |
pos.matrix |
matrix contains information of positions of derivatives.
Default is |
Value
mt3_covZtZs
Covariance matrix relating to the use
of third derivatives.
mt4_covZtZs
Covariance matrix relating to the use of
fourth derivatives. This also contains information on the third
third derivatives mt3_covZtZs
.
Examples
set.seed(1)
p <- 3
x <- MASS::mvrnorm(100, rep(0, p), diag(p))
t <- rep(0.2, p)
s <- rep(-.3, p)
# Using third derivatives
pos.matrix3 <- mt3_pos(p)
sZtZs3 <- mt3_covZtZs(t, s, pos.matrix = pos.matrix3)
dim(sZtZs3)
sZtZs3[1:5, 1:5]
# Using fourth derivatives
sZtZs4 <- mt4_covZtZs(t, s)
dim(sZtZs4)
sZtZs4[1:5, 1:5]
[Package PlotNormTest version 1.0.1 Index]