fd_psd: Power Spectral Density Slope (PSD).

View source: R/fd.R

fd_psdR Documentation

Power Spectral Density Slope (PSD).

Description

Estimate Alpha, Hurst Exponent and Fractal Dimension through log-log slope.

Usage

fd_psd(
  y,
  fs = NULL,
  removeTrend = c("no", "poly", "adaptive", "bridge")[2],
  polyOrder = 1,
  standardise = c("none", "mean.sd", "median.mad")[2],
  fitMethod = c("lowest25", "Wijnants", "Hurvich-Deo")[3],
  doPlot = FALSE,
  returnPlot = FALSE,
  returnPLAW = FALSE,
  returnInfo = FALSE,
  silent = FALSE,
  noTitle = FALSE,
  tsName = "y"
)

Arguments

y

A numeric vector or time series object.

fs

Sample rate (default = NULL)

standardise

standardise the series (default = TRUE).

fitMethod

Method to decide on a frequency range for log-log fit. Can be one of: "lowest25","Wijnants","Hurvich-Deo" (default). See details for more info.

doPlot

Return the log-log spectrum with linear fit (default = TRUE).

returnPlot

Return ggplot2 object (default = FALSE)

returnPLAW

Return the power law data (default = FALSE)

returnInfo

Return all the data used in SDA (default = FALSE)

silent

Run in silent-ish mode (default = ⁠TRUE)⁠

noTitle

Do not generate a title (only the subtitle)

tsName

Name of y added as a subtitle to the plot

detrend

Subtract linear trend from the series (default = TRUE).

Details

Calls function stats::spec.pgram() to estimate the scaling exponent of a timeseries based on the periodogram frequency spectrum. After detrending and normalizing the signal (if requested), stats::spec.pgram() is called using a cosine taper = 0.5.

A line is fitted on the periodogram in log-log coordinates. The full range is fitted as well as one of three fit-ranges:

  • lowest25 - The 25\

  • Wijnants - The 50 lowest frequencies (Wijnants et al., 2012)

  • Hurvich-Deo - The Hurvich-Deo estimate (Hurvich & Deo, 1999)

Value

A list object containing:

  • A data matrix PLAW with columns freq.norm, size and bulk.

  • Estimate of scaling exponent alpha based on a fit over the lowest 25\

  • Estimate of the the Fractal Dimension (FD) using conversion formula's reported in Hasselman(2013).

  • Information output by various functions.

Author(s)

Fred Hasselman

References

Hasselman, F. (2013). When the blind curve is finite: dimension estimation and model inference based on empirical waveforms. Frontiers in Physiology, 4, 75. https://doi.org/10.3389/fphys.2013.00075

Hurvich, C.M., & Deo, R.R. (1999). Plug-in Selection of the Number of Frequencies in Regression Estimates of the Memory Parameter of a Long Memory Time Series. Journal of Time Series Analysis, 20(3), 331–341.

See Also

Other Fluctuation Analyses: fd_RR(), fd_allan(), fd_dfa(), fd_mfdfa(), fd_sda(), fd_sev()


FredHasselman/casnet documentation built on March 10, 2024, 8:23 a.m.