Description Usage Arguments Value Examples
HAC estimator of autocovariance for the composite marginal.
1 | composite_marginal_hac(data, params, k = 10, max_length = 100, near_pd = F)
|
data |
Data on which to compute the autocovariance. |
params |
Composite likelihood params. |
k |
Maximum lag. |
max_length |
Maximum length of data used to compute the score functions. |
near_pd |
Boolean, nearest positive definite matrix from HAC estimate. |
Composite marginal HAC autocovariance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | xi <- 1.
kappa <- 9.
sigma <- 1.
n <- 100
p_zero <- 1 - 1. / (1. + kappa)
test_column <- 2
set.seed(42)
zeroes <- stats::runif(n = n, min = 0, max = 1)
test_samples <- evir::rgpd(n = n, xi = xi, mu = 0, beta = sigma)
test_samples[which(zeroes < p_zero)] <- 0.0
composite_marginal_hac(
data = test_samples, params = c(xi, sigma, kappa),
k = 3, max_length = 50
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.