R/get_stats.R
getDiffRhythmStats.Rd
This function computes differences in rhythmicity between fitted curves for a
given pair of conditions. Register a parallel backend to minimize runtime,
e.g., using doParallel::registerDoParallel()
.
getDiffRhythmStats(fit, rhyStats, condLevels)
fit | A |
---|---|
rhyStats | A |
condLevels | A character vector indicating the two conditions to
compare. Differences will be returned as the value for |
A data.table
containing the following differentially rhythmic
statistics:
diff_mean_value
diff_peak_trough_amp
diff_rms_amp
diff_peak_phase
: circular difference between -fit$period/2
and
fit$period/2
diff_trough_phase
: circular difference between -fit$period/2
and
fit$period/2
rms_diff_rhy
: root mean square difference in mean-centered fitted curves
The rows of the data.table
depend on the 'fitType' attribute of rhyStats
:
'fitType' is 'posterior_mean' or 'raw': one row per feature.
'fitType' is 'posterior_samples': one row per feature per posterior sample.