R/Estimate_Acps.R

Defines functions Estimate_Acps

Documented in Estimate_Acps

Estimate_Acps <-
function(ts, method = "periodogram") {
  # Calculating autocorrelation
  acf_values <- acf(ts, plot = FALSE)$acf

  # Estimation of power spectrum based on periodogram method 
    spectrum <- spectrum(acf_values, plot = FALSE)
    return(spectrum$spec)
}

Try the ADTSA package in your browser

Any scripts or data that you put into this service are public.

ADTSA documentation built on May 29, 2024, 11:48 a.m.