lc50_calculate: Batch Calculation of LC Values

View source: R/lc50_calculate.R

lc50_calculateR Documentation

Batch Calculation of LC Values

Description

Computes the LC estimates for every data set read by lc50_read, using the selected estimation method(s), and returns both the detailed per-file results and a summary data frame.

Usage

lc50_calculate(lcd, lc = 0.5, method = "traditional")

Arguments

lcd

The named list returned by lc50_read.

lc

Numeric; the lethal proportion for which the concentration is estimated. The default 0.5 gives the LC50, 0.9 the LC90.

method

Character string or vector; the estimation method(s) to use: one or several of "traditional" (traditional linear regression, the default), "improved" (improved linear regression) and "probit" (probit analysis), case-insensitive, or "all" for all three in a single call. The full English method names are accepted as well.

Details

The selected method(s) are applied to every data set; the default is the traditional linear regression. The summary data frame gets one row per file and method, and the progress log reports the status of every method for every file. A file that fails (e.g. because too few valid concentrations remain after the Abbott correction) does not interrupt the batch: the error message is recorded in the Equation column of the summary data frame instead.

Value

A list with elements

results

nested list: one element per file, each holding one element per selected method with its result list (or the error message)

summary_df

data frame with one row per file and method: estimate, 95 goodness-of-fit

lc

the lethal proportion used

References

Finney, D. J. (1971) Probit Analysis, 3rd edition. Cambridge University Press, Cambridge.

See Also

lc50_read, lc50_traditional, lc50_improved, lc50_probit, lc50_plot, lc50_export

Examples

f <- system.file("extdata", "lc50_example.csv", package = "insectecol")
res <- lc50_calculate(lc50_read(f), lc = 0.7)     # LC70
res$summary_df
lc50_calculate(lc50_read(f), method = "all")$summary_df   # all methods

insectecol documentation built on Oct. 5, 2026, 5:08 p.m.