composite_marginal_hac: HAC estimator of autocovariance for the composite marginal.

Description Usage Arguments Value Examples

View source: R/custom_mle.R

Description

HAC estimator of autocovariance for the composite marginal.

Usage

1
composite_marginal_hac(data, params, k = 10, max_length = 100, near_pd = F)

Arguments

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.

Value

Composite marginal HAC autocovariance.

Examples

 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
)

valcourgeau/gammaextremes documentation built on Sept. 9, 2021, 5:42 a.m.