This function computes differences in rhythmicity between fitted curves for a given pair of conditions.

getDiffRhythmStats(fit, rhyStats, conds = fit$conds, dopar = TRUE)

Arguments

fit

A limorhyde2 object containing data from multiple conditions.

rhyStats

A data.table of rhythmic statistics, as returned by getRhythmStats(), for fitted models in fit.

conds

A character vector indicating the conditions to compare pairwise, by default all conditions in fit.

dopar

Logical indicating whether to run calculations in parallel if a parallel backend is already set up, e.g., using doParallel::registerDoParallel(). Recommended to minimize runtime.

Value

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 stats will be based on the value for cond2 minus the value for cond1. The rows of the data.table depend on the 'fitType' attribute of rhyStats:

  • 'fitType' is 'posterior_mean' or 'raw': one row per feature per pair of conditions.

  • 'fitType' is 'posterior_samples': one row per feature per posterior sample per pair of conditions.

See also