Evaluate if a curve is linear based on curve summary statistics
Usage
evaluate_linearity(
curve_summary,
dilution_summary = lifecycle::deprecated(),
grouping_variable = c(),
corrcoef_column = "r_corr",
corrcoef_min_threshold = 0.8,
pra_column = "pra_linear",
pra_min_threshold = 80,
mandel_p_val_column = "mandel_p_val",
mandel_p_val_threshold = 0.05,
concavity_column = "concavity"
)
Arguments
- curve_summary
A data frame or tibble output from the function
summarise_curve_data()
.- dilution_summary
- grouping_variable
A character vector of column names in
curve_summary
to indicate which columns should be placed first before the evaluation results. Default: c()- corrcoef_column
A column in
curve_summary
that holds the correlation coefficient. Default: 'r_corr'- corrcoef_min_threshold
The minimum threshold value of the curve's correlation coefficient to pass being potentially linear. Equality to the threshold is considered a pass. Default: 0.8
- pra_column
A column in
curve_summary
that holds the percent residual accuracy, Default: 'pra_linear'.- pra_min_threshold
The minimum threshold value of the curve's percent residual accuracy to pass being potentially linear. Equality to the threshold is considered a pass. Default: 80
- mandel_p_val_column
A column in
curve_summary
that holds the p value results for the Mandel's fitting test. Default: 'mandel_p_val'- mandel_p_val_threshold
The threshold value of the curve's p value for the Mandel's fitting test to reject the hypothesis that the quadratic model fits better than the linear model. Default: 0.05
- concavity_column
A column in
curve_summary
that holds the concavity of the quadratic model, Default: 'concavity'.
Details
Two work flows are given to evaluate linearity of dilution
curves. The results are highlighted as columns wf1_group
and
wf2_group
for now. Column names used to categorise the dilution
curves will be moved to the front allow with wf1_group
and
wf2_group
.
Examples
r_corr <- c(0.951956, 0.948683, 0.978057, 0.976462, 0.970618, 0.969348)
pra_linear <- c(65.78711, 64.58687, 90.21257, 89.95473, 72.91220, 72.36528)
mandel_p_val <- c(
2.899006e-07, 7.922290e-07, 2.903365e-01, 3.082930e-01,
3.195779e-08, 6.366588e-08
)
concavity <- c(
-4133.501328, -4146.745747, -3.350942, -3.393617,
0.3942824, 0.4012963
)
curve_summary <- data.frame(
r_corr = r_corr, pra_linear = pra_linear,
mandel_p_val = mandel_p_val,
concavity = concavity
)
curve_summary <- evaluate_linearity(curve_summary)
print(curve_summary, width = 100)
#> wf1_group wf2_group r_corr pra_linear mandel_p_val concavity
#> 1 Poor Linearity Saturation Regime 0.951956 65.78711 2.899006e-07 -4133.5013280
#> 2 Poor Linearity Saturation Regime 0.948683 64.58687 7.922290e-07 -4146.7457470
#> 3 Good Linearity Good Linearity 0.978057 90.21257 2.903365e-01 -3.3509420
#> 4 Good Linearity Good Linearity 0.976462 89.95473 3.082930e-01 -3.3936170
#> 5 Poor Linearity Noise Regime 0.970618 72.91220 3.195779e-08 0.3942824
#> 6 Poor Linearity Noise Regime 0.969348 72.36528 6.366588e-08 0.4012963