Learn R Programming

LW1949 (version 1.1.0)

dataprep: Prepare Data

Description

Prepare dose-effect data for evaluation.

Usage

dataprep(dose, ntot, nfx)

Arguments

dose
A numeric vector of unique, chemical concentrations (see Details).
ntot
A numeric vector of the number of individuals that were tested at each dose.
nfx
A numeric vector of the number of individuals that were affected at each dose.

Value

A data frame with eight columns (ordered by dose and proportion affected), seven numeric vectors and one logical vector:
  • dose = chemical concentrations.
  • ntot = the number of individuals that were tested at each dose.
  • nfx = the number of individuals that were affected at each dose.
  • rec = the record number corresponding to the input vectors dose, ntot, nfx.
  • pfx = the proportion of individuals that were affected at each dose.
  • log10dose = log transformed dose, log10(dose).
  • bitpfx = probit transformed proportional affected, probit(pfx).
  • fxcateg = effects category: 0 for none affected, 100 for all affected, and 50 for other proportions affected.
  • LWkeep = logical vector identifying records to keep for Litchfield and Wilcoxon (1949, step A1) method.

Details

The input data are expected to be summarized by dose. If duplicate doses are provided, an error will be thrown.

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
conc <- c(0.0625, 0.125, 0.25, 0.5, 1)
numtested <- rep(8, 5)
nalive <- c(1, 4, 4, 7, 8)
dataprep(dose=conc, ntot=numtested, nfx=nalive)

Run the code above in your browser using DataLab