Computes R-squared and Adjusted R-squared of loess regression compared to linear regression. Used for determining linearity of C-QT data

compute_loess_linear_r_squared(data, deltaqtc_col, conc_col, span = 0.99)

Arguments

data

A data frame containing C-QT analysis dataset

deltaqtc_col

An unquoted column name for dQTCF measurements

conc_col

An unquoted column name for drug concentration measurements

span

A fractional value for LOESS span parameter in geom_smooth if LOESS is used, default 0.99

Value

a tibble of R_squared and adjusted R_squared

Examples

compute_loess_linear_r_squared(cqtkit_data_verapamil %>% preprocess(), deltaQTCF, CONC)
#> # A tibble: 1 × 3
#>   R_squared R_squared_adj R_partial_det
#>       <dbl>         <dbl>         <dbl>
#> 1     0.971         0.971       0.00121