Fit and summarise qPCR calibration curves.

calib_stats(data, type = "effects", ...)

Arguments

data

A tibble or data.frame containing data for one or more calibration curves.

type

The level of detail to return. "effects" returns slope and intercept estimates, "r2" returns the R^2 of the model fits.

...

Placeholder for further arguments that might be needed by future implementations.

Value

A tibble containing summary statistics of model fit for each calibration curve.

Details

The calibration curves are fitted using a linear model with the lm function. SQ values are log10 transformed prior to model fitting.

The data object contains data for at least one qPCR calibration curve usually presented as Cq (Ct) value and corresponding copy number from from a series of serial dilutions. The data object must contain the headers Target, Cq and SQ. The Target column must contain unique identifiers for each calibration curve. The Cq column contains the Cq (Ct) values and SQ contains the copy number data. Additional columns will be ignored.

The "type" argument can only take the character strings "effects" or "r2". Specifying "effects" will return the slope and intercept estimates, standard error for each estimate, the test statistic and p.value for each calibration curve. Specifying "r2" returns the R^2 for each model.

Non-detections in data should be represented as NA.

Examples

if (FALSE) { sum_stats <- calib_stats(calib_data, type = "effects") sum_stats <- calib_stats(calib_data, type = "r2") }