covZtZs | R Documentation |
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
.
mt3_covZtZs(t, s, pos.matrix = NULL)
mt4_covZtZs(t, s, pos.matrix = NULL)
t , s |
a vector of length |
pos.matrix |
matrix contains information of positions of derivatives.
Default is |
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
.
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.