trawl_deriv_mod {ambit}R Documentation

Estimating the derivative of the trawl function

Description

This function estimates the derivative of the trawl function using the modified version proposed in Sauri and Veraart (2022).

Usage

trawl_deriv_mod(data, Delta, lag = 100)

Arguments

data

The data set used to compute the derivative of the trawl function

Delta

The width Delta of the observation grid

lag

The lag until which the trawl function should be estimated

Details

According to Sauri and Veraart (2022), the derivative of the trawl function can be estimated based on observations X_0, X_{\Delta_n}, \ldots, X_{(n-1)\Delta_n} by

\widehat a(t)=\frac{1}{\sqrt{ n\Delta_{n}^2}} \sum_{k=l+1}^{n-2}(X_{(k+1)\Delta_n}-X_{k\Delta_n}) (X_{(k-l+1)\Delta_n}-X_{(k-l)\Delta_n}),

for \Delta_nl\leq t < (l+1)\Delta_n.

Value

The function returns the lag-dimensional vector (\hat a'(0), \hat a'(\Delta), \ldots, \hat a'((lag-1) \Delta)).

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

#Estimate the trawl function
my_lag <- 100+1
trawl <- nonpar_trawlest(Poi_data, my_delta, lag=my_lag)$a_hat

#Estimate the derivative of the trawl function
trawl_deriv <- trawl_deriv_mod(Poi_data, my_delta, lag=100)

[Package ambit version 0.1.2 Index]