rho_T1: Compute rho(T_{1}) used in the Truncated Kernel Regression...

View source: R/kernel_regression_estimator.R

rho_T1R Documentation

Compute \rho(T_{1}) used in the Truncated Kernel Regression Estimator.

Description

This helper function computes \rho(T_{1}) used in the truncated kernel regression estimator, truncated_est.

Usage

rho_T1(
  x,
  meanX,
  T1,
  b,
  xij_mat,
  kernel_name = "gaussian",
  kernel_params = c(),
  custom_kernel = FALSE
)

Arguments

x

A vector of lags.

meanX

The average value of X.

T1

The first trunctation point.

b

Bandwidth parameter, greater than 0.

xij_mat

The matrix of pairwise covariance values.

kernel_name

The name of the symmetric kernel (see kernel_symm) function to be used. Possible values are: gaussian, wave, rational_quadratic, and bessel_j. Alternatively, a custom kernel function can be provided, see the examples.

kernel_params

A vector of parameters of the kernel function. See kernel_symm for parameters.

custom_kernel

If a custom kernel is to be used or not. Defaults to FALSE.

Details

This function computes the following value,

\hat{\rho}(T_{1}) = \left( \sum_{i=1}^{N} \sum_{j=1}^{N} \check{X}_{ij} K((T_{1} - (t_{i} - t_{j})) / b) \right) \left( \sum_{i=1}^{N} \sum_{j=1}^{N} K((T_{1} - (t_{i} - t_{j}))) / b) \right)^{-1},

where \check{X}_{ij} = (X(t_{i}) - \bar{X}) (X(t_{j}) - \bar{X}), which is then used in truncated_est,

\hat{\rho}_{1}(t) = \left\{ \begin{array}{ll} \hat{\rho}(t) & 0 \leq t \leq T_{1} \\ \hat{\rho}(T_{1}) (T_{2} - t)(T_{2} - T_{1})^{-1} & T_{1} < t \leq T_{2} \\ 0 & t > T_{2} \end{array} \right. .

Value

The estimated autocovariance function at T_{1}.

References

Hall, P. & Patil, P. (1994). Properties of nonparametric estimators of autocovariance for stationary random fields. Probability Theory and Related Fields 99(3), 399-424. https://doi.org/10.1007/bf01199899

Hall, P., Fisher, N. I., & Hoffmann, B. (1994). On the nonparametric estimation of covariance functions. The Annals of Statistics 22(4), 2115-2134. https://doi.org/10.1214/aos/1176325774

Examples

X <- c(1, 2, 3, 4)
rho_T1(1:4, mean(X), 1, 0.1, Xij_mat(X, mean(X)), "gaussian", c(), FALSE)
my_kernel <- function(x, theta, params) {
  stopifnot(theta > 0, length(x) >= 1)
  return(exp(-((abs(x) / theta)^params[1])) * (2 * theta  * gamma(1 + 1/params[1])))
}
rho_T1(1:4, mean(X), 1, 0.1, Xij_mat(X, mean(X)), my_kernel, c(0.25), TRUE)

CovEsts documentation built on Sept. 10, 2025, 10:39 a.m.

Related to rho_T1 in CovEsts...