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

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.

Value

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

Details

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

See also

Author

Diego Barneche and Scott Burgess.