Get ordinary least squares mean and confidence intervals from energetics
Source:R/energetics.R
energetics_ols_summary.Rd
Helper function to calculate mean and standard deviation of ATP production
from glycolysis and OXPHOS at points defined in partition_data
and with
values calculated using the get_energetics
function. Should only be called
from get_energetics_summary
as the function itself only operaes on a
vector without any of the grouping that get_energetics
does.
Examples
rep_list <- system.file("extdata", package = "ceas") |>
list.files(pattern = "*.xlsx", full.names = TRUE)
seahorse_rates <- read_data(rep_list, sheet = 2)
partitioned_data <- partition_data(seahorse_rates)
energetics <- get_energetics(partitioned_data, ph = 7.4, pka = 6.093, buffer = 0.1)
# Only for one row and across all groups and replicates.
# For the full correctly grouped energetics table run
# `get_energetics_summary` with `model = "ols"`.
energetics_ols_summary(energetics$ATP_max_resp, error_metric = "ci", conf_int = 0.95)
#> $mean
#> [1] 1085.137
#>
#> $sd
#> [1] 280.1745
#>
#> $se
#> [1] 29.21021
#>
#> $lower_bound
#> [1] 1027.886
#>
#> $higher_bound
#> [1] 1142.388
#>