View source: R/tapered_estimator.R
taper_single | R Documentation |
This helper function computes the taper function for a given window function as
a(x; \rho) = \left\{
\begin{array}{ll}
w(2x/\rho) & 0 \leq x < \frac{1}{2} \rho, \\
1 & \frac{1}{2}\rho \leq x \leq \frac{1}{2} \\
a(1 - x; \rho) & \frac{1}{2} < x \leq 1
\end{array} ,
\right.
where w(\cdot)
is a continuous increasing function with w(0)=0, w(1)=1,
\rho \in (0, 1],
and x \in [0, 1].
The possible window function choices are found in window.
taper_single(x, rho, window_name, window_params = c(1), custom_window = FALSE)
x |
A number between 0 and 1 (inclusive). |
rho |
A scale parameter in |
window_name |
The name of the window function to be used. Possible values are: tukey, triangular, power_sine, blackman, hann_poisson, welch. Alternatively, a custom window function can be provided, see the example. |
window_params |
A vector of parameters of the window function. |
custom_window |
If a custom window is to be used or not. Defaults to |
A value of the taper function at x.
x <- 0.4
taper_single(x, 0.5, "tukey")
my_taper <- function(x, ...) {
return(x)
}
taper_single(x, 0.5, my_taper, custom_window = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.