Function to plot the Rate-of-Change sequence
Source:R/fc_plot_RoC_sequence.R
fc_plot_RoC_sequence.Rd
This function was deprecated, please use plot_roc()
.
Usage
fc_plot_RoC_sequence(
data_source,
age_threshold = NULL,
roc_threshold = NULL,
Roc_threshold = lifecycle::deprecated(),
peaks = FALSE,
Peaks = lifecycle::deprecated(),
trend = NULL
)
Arguments
- data_source
Data.frame. Output of
estimate_roc
function- age_threshold
Numeric. Cut-off value used as maximum age.
- roc_threshold
Numeric Cut-off value used as maximum RoC value.
- Roc_threshold
Roc_threshold
is no longer supported; please useroc_threshold
- peaks
Logical. If peak-points are presented in the dataset and
peaks
==TRUE
, then peak points will be displayed- Peaks
- trend
If peak-points are presented in the dataset and
peaks
==TRUE
, then one of the three method can be used to visualise the process of peak detection:"threshold"
- Each point in the RoC sequence is compared to a median of all RoC scores from the whole sequence (i.e. threshold value). The ROC value for a point is considered significant if the 95th quantile of the RoC scores from all calculations is higher than the threshold value."trend_linear"
- A linear model is fitted between the RoC values and their ages. Differences between the model and each point are calculated (residuals). The standard deviation (SD) is calculated from all the residuals. A peak is considered significant if it is 2 SD higher than the model."trend_non_linear"
- A conservative generalised additive model (GAM) is fitted through the RoC scores and their ages (GAM =RoC ~ s(age, k = 3)
using themgcv
package (Wood, 2011). The distance between each point and the fitted value is calculated (residuals). The standard deviation (SD) is calculated from all the residuals. A peak is considered significant if it is 2 SD higher than the model.