These functions provides a series of methods to assess periodicity of circadian processes.
ac_periodogram(x, period_range = c(hours(16), hours(32)),
sampling_rate = 1/mins(1), alpha = 0.05)chi_sq_periodogram(x, period_range = c(hours(16), hours(32)),
sampling_rate = 1/mins(1), alpha = 0.05,
time_resolution = hours(0.1))
cwt_periodogram(x, period_range = c(hours(16), hours(32)),
sampling_rate = 1/mins(1), alpha = 0.05, resolution = 1/512,
n_sim = 10)
fourier_periodogram(x, period_range = c(hours(16), hours(32)),
sampling_rate = 1/mins(1), alpha = 0.05)
ls_periodogram(x, period_range = c(hours(16), hours(32)),
sampling_rate = 1/mins(1), alpha = 0.05, oversampling = 8)
numeric vector
vector of size 2 defining minimal and maximal range of period to study (in seconds)
the -- implicitly regular -- sampling rate of x (in hertz)
significance level
the resolution of periods to scan
the period resolution of the CWT (i.e. the number of suboctaves)
the number of shuffling simulation to compute p-value (see WaveletComp::analyze.wavelet)
the oversampling factor (see lomb::lsp)
a data.table with the columns:
period
-- the period (in s)
power
-- the power (or equivalent) for a given period
p_value
-- the significance of the power
signif_threshold
-- the significance threshold of the power (at alpha)
zeitgebr tutorial -- the relevant rehtomics tutorial
lomb::lsp -- the orginal function for ls_periodogram
xsp::chiSqPeriodogram -- code modified from
stats::acf -- the orginal function for ac_periodogram
WaveletComp::analyze.wavelet -- the orginal function for cwt_periodogram