noise_calc: Environmental noise wrapper

Description Usage Arguments Details Value Author(s) See Also

View source: R/helpers.R

Description

Adapts periodogram and calculates the 'colour' of the noise of unpredicted de-trended residuals

Usage

1
2
3
4
5
noise_calc(
  resid_time_series,
  predictor,
  noise_method = c("spectrum", "lomb_scargle")
)

Arguments

resid_time_series

A numeric vector containing unpredicted de-trended residuals as obtained by function monthly_bins.

predictor

A numeric vector containing the time (in days) for each observation in resid_time_series. Needs to start at day 0.

noise_method

A method for estimating the slope beta. Takes 2 possible values: 'spectrum' for evenly distributed time series or 'lomb_scargle' for unevenly distributed ones.

Details

This function calculates beta slope (assuming 1/f noise family) on the residual time series using function spec_slope_get.

Value

A list containing the beta slope, the original spec_obj data.frame, and the fitted linear model.

Author(s)

Diego Barneche and Scott Burgess.

See Also

monthly_bins, seasonality_and_colour, spec_slope_get.


dbarneche/envPred documentation built on June 28, 2020, 5:04 p.m.