step_fft_pgram
step_fft_pgram.Rd
Periodgrams and cross-periodograms using a method similar to
stats::spec.pgram
.
Usage
step_fft_pgram(
.rec,
terms,
spans = 3,
detrend = TRUE,
demean = TRUE,
lst = TRUE,
taper = 0.1,
pad_fft = TRUE,
time_step = 1,
role = "predictor",
...
)
Arguments
- .rec
the R6 recipe object.
- terms
the unquoted names of the variables to use or a selector function. terms replaces the `...` of the recipes package but requires variables to be included within `c()`. For example to include variables x and y you would write `c(x,y)` in the hydrorecipes package.
- spans
vector of odd integers giving the widths of modified Daniell smoothers to be used to smooth the periodogram.
- detrend
logical. If
TRUE
, remove a linear trend from the series. This will also remove the mean.- demean
logical. If
TRUE
, subtract the mean of the series.- lst
logical
return a list?- taper
specifies the proportion of data to taper. A split cosine bell taper is applied to this proportion of the data at the beginning and end of the series.
- pad_fft
logical
Zero pad the list for faster FFT calculation?- time_step
numeric
monitoring interval size- role
character - the name of the role
- ...
additional arguments
Examples
formula <- as.formula(y~.)
dat <- data.frame(x = rnorm(200),
y = rnorm(200))
frec = recipe(formula = formula, data = dat) |>
step_fft_pgram(c(x,y))