test_asymnorm_est: Computing the feasible statistic of the trawl function CLT

View source: R/NonparTrawlEstimation.R

test_asymnorm_estR Documentation

Computing the feasible statistic of the trawl function CLT

Description

This function computes the feasible statistics associated with the CLT for the trawl function estimation.

Usage

test_asymnorm_est(
  data,
  Delta,
  trawlfct,
  trawlfct_par,
  biascor = FALSE,
  k = NULL
)

Arguments

data

The data set based on observations of X_0, X_{Δ_n}, …, X_{(n-1)Δ_n}

Delta

The width Delta of the observation grid

trawlfct

The trawl function for which the asymptotic variance will be computed (Exp, supIG or LM)

trawlfct_par

The parameter vector of the trawl function (Exp: lambda, supIG: delta, gamma, LM: alpha, H)

biascor

A binary variable determining whether a bias correction should be computed, the default is FALSE

k

The optional parameter specifying the time point in 0, 1, …, n-1; the test statistic will be computed for the time point k Δ_n.

Details

As derived in Sauri and Veraart (2022), the feasible statistic, for t>0, is given by

T(t)_n:=\frac{√{nΔ_{n}}}{√{\widehat{σ_{a}^2(t)}}} ≤ft(\hat{a}(t)-a(t)-bias(t)\right).

For t=0, we have

T(t)_n:=\frac{√{nΔ_{n}}}{√{RQ_n}} ≤ft(\hat{a}(0)-a(0)-bias(0)\right),

where

RQ_n:=\frac{1}{√{2 nΔ_{n}}} ∑_{k=0}^{n-2}(X_{(k+1)Δ_n}-X_{kΔ_n})^4.

We set bias(t)=0 in the case when biascor==FALSE and bias(t)=0.5 * Δ * \hat a'(t) otherwise.

Value

The function returns the vector of the feasible statistics (T(0)_n, T((Δ)_n, …, T((n-2)Δ_n)) if no bias correction is required and (T(0)_n, T((Δ)_n, …, T((n-3)Δ_n)) if bias correction is required if k is not provided, otherwise it returns the value T(k Δ_n)_n. If the estimated asymptotic variance is <= 0, the value of the test statistic is set to 999.

Examples

##Simulate a trawl process
##Determine the sampling grid
my_n <- 1000
my_delta <- 0.1
my_t <- my_n*my_delta

###Choose the model parameter
#Exponential trawl function:
my_lambda <- 2
#Poisson marginal distribution trawl
my_v <- 1

#Set the seed
set.seed(123)
#Simulate the trawl process
Poi_data <- sim_weighted_trawl(my_n, my_delta,
                               "Exp", my_lambda, "Poi", my_v)$path

#Compute the test statistic for time t=0
##Either one can use:
test_asymnorm_est(Poi_data, my_delta,
                  trawlfct="Exp", trawlfct_par=my_lambda)[1]
#or:
test_asymnorm_est(Poi_data, my_delta,
                  trawlfct="Exp", trawlfct_par=my_lambda, k=0)

ambit documentation built on Aug. 19, 2022, 5:19 p.m.