ffttest: Frequency Analysis Test

View source: R/coetest.R

ffttestR Documentation

Frequency Analysis Test

Description

This function analyses FFTs and compares the amplitudes of all frequencies to those of simulations.

Usage

ffttest(data, sims.df = sims, sims.df.col = "density.bf", top5 = FALSE)

Arguments

data

A seqbf-object or a vector containing Fourier transformed (spectral density) data (use 'fftcreate' function).

sims.df

A dataframe containing simulations, including columns "index" and "simid".

sims.df.col

The column of the simulation dataframe that contains the comparison data.

top5

Logical. If set to TRUE, function will additionally return the Top5-Frequency method. For each frequency the function counts how many simulations show a higher amplitude. If no more than 5 percent of simulations are above the experimental value, it is considered a "Top5-Frequency". The proportion of Top5-Frequencies indicates the pronouncedness of oscillatory elements in the data.

Details

If you want to use the old "Top5-Frequency" method instead of amplitude sums, indicate by setting 'top5 = TRUE'.

Value

A list containing a dataframe of all frequencies and the proportion of simulations with a lower amplitude, and information on the sum of amplitudes.

Examples

ffttest(bf, sims)
r.fft <- ffttest(fftcreate(seqbf))
r.fftrw <- ffttest(tblFFT$density.rw, sims.df = newsims, sims.df.col = "density.rw")

mrzdcmps/changeofevidence documentation built on Feb. 27, 2025, 3:10 a.m.