Skip to contents

Calculate the Goodness of Fit of the Linear Model.

Usage

calculate_gof_linear(
  curve_data,
  conc_var,
  signal_var,
  dilution_data = lifecycle::deprecated()
)

Arguments

curve_data

A data frame or tibble containing curve data.

conc_var

Column name in curve_data to indicate concentration.

signal_var

Column name in curve_data to indicate signal.

dilution_data

[Deprecated] dilution_data was renamed to curve_data.

Value

A tibble containing the Goodness of Fit measures of the linear model The Goodness of Fit measures are the Pearson correlation coefficient (R), the R^2 and the adjusted R^2.

Details

The function will return a tibble with NA values if the number of curve points is less than or equal to three.

Examples

concentration <- c(10, 20, 40, 60, 80, 100)

signal <- c(22561, 31178, 39981, 48390, 52171, 53410)

curve_data <- data.frame(Concentration = concentration,
                         Signal = signal)

curve_linear_gof <- calculate_gof_linear(
  curve_data,
  "Concentration",
  "Signal"
)

curve_linear_gof
#> # A tibble: 1 × 3
#>   r_corr r2_linear r2_adj_linear
#>    <dbl>     <dbl>         <dbl>
#> 1  0.956     0.913         0.892