Learn R Programming

LW1949 (version 1.1.0)

LWP: User Friendly Evaluation of Dose-Effect Experiments using Litchfield-Wilcoxon

Description

User friendly evaluation of dose-effect experiments using automated Litchfield Wilcoxon (1949) and probit estimation methods. This function has been tailored for non-R users with input data set up in a particular way (see Details).

Usage

LWP(rawfile = NULL, descrcolz = 1:4, saveplots = TRUE,
  showplots = FALSE, saveresults = TRUE, showresults = TRUE,
  returnresults = FALSE)

Arguments

rawfile
A character scalar specifying the path of the input data as a csv file. If NULL, default, the user will be prompted to browse to a file using a menu.
descrcolz
A numeric vector, the column numbers to use as the description of the test, default 1:4.
saveplots
A logical scalar indicating if plots should be saved to a pdf file, default TRUE. See details.
showplots
A logical scalar indicating if plots should be shown on screen, default FALSE. See details.
saveresults
A logical scalar indicating if results should be saved to a csv file, default TRUE. The csv file is given the same name (plus the suffix "Smry") and is placed in the same directory as the input file.
showresults
A logical scalar indicating if results should be printed to the console, default TRUE. These results include the chi-squared statistic, degrees of freedom, and p-value for the Litchfield Wilcoxon method.
returnresults
A logical scalar indicating if results should be returned by the function, default FALSE.

Value

If returnresults=TRUE, a data frame with 11 rows per test and 2 more columns than the input data. Three columns from the input data are not included (TFM Conc. (mg/L), No. Tested, and No. Dead). Five columns are added: the parameter (param), the method used (method), the estimate (estimate), and the 95% confidence interval of the estimate (lower95ci and upper95ci)

Details

The input data must include at least these seven columns, with these names in the header row:
  • Test ID = A character or numeric vector, the unique identifier for each test
  • Source = A character vector, the source of the chemical
  • Batch = A character or numeric vector, the batch of the chemical
  • Species = A character vector, the species tested
  • TFM Conc. (mg/L) = A numeric vector, the concentration of TFM in mg/L
  • No. Tested = A numeric vector, the number of animals tested
  • No. Dead = A numeric vector, the number of animals dead
The input data are expected to be summarized by dose. If duplicate doses are provided, an error will be thrown. Both saveplots and showplots may be set to FALSE, in which case no plots will be produced. But both may not be set to TRUE.

References

Litchfield, JT Jr. and F Wilcoxon. 1949. A simplified method of evaluating dose-effect experiments. Journal of Pharmacology and Experimental Therapeutics 96(2):99-113. http://jpet.aspetjournals.org/content/96/2/99.abstract.

Examples

Run this code
## Not run: ------------------------------------
# LWP()
## ---------------------------------------------

Run the code above in your browser using DataLab