Skip to contents

Given a value \(\hat{I}^{(i,j)}(\boldsymbol\omega)\) for a frequency \(\boldsymbol\omega\), this function applies kernel smoothing and returns the smoothed value as follows: $$\hat{F}^{(i,j)}_{\boldsymbol{b}}(\boldsymbol\omega) = \frac{\sum_{\boldsymbol{k} \in\mathbb{Z}^2}K_{\boldsymbol{b}}(\boldsymbol\omega - \boldsymbol{x_{k,\Omega}}) \hat{I}^{(i,j)}(\boldsymbol{x_{k,\Omega}})}{\sum_{\boldsymbol{k}\in\mathbb{Z}^2}K_{ \boldsymbol{b}}(\boldsymbol\omega - \boldsymbol{x_{k,\Omega}})}.$$ This function is used in periodogram_smooth() to evaluate the kernel spectral density estimate for all frequencies.

Usage

smoother(w, period.mat, w.k1, w.k2, b1 = 1, b2 = b1, loo = FALSE, kernel_uni)

Arguments

w

Input frequency \(\boldsymbol\omega = (\omega_1,\omega_2)^\intercal\).

period.mat

Matrix. The naive spectral estimate, i.e., periodogram \( \hat{I}(\cdot)\), could be complex-valued.

w.k1, w.k2

Vectors containing the whole frequencies at horizontal and vertical directions.

b1, b2

Numeric. Bandwidth values for horizontal and vertical directions.

loo

Logical. If TRUE, conduct leave-one-out kernel smoothing (the center w will be excluded when averaging). Otherwise, keep the center w for averaging.

kernel_uni

Univariate kernel function \(K\).

Value

A value, \(\hat{F}^{(i,j)}_{\boldsymbol{b}}(\boldsymbol\omega)\).