Learn R Programming

LW1949 (version 1.0.0)

fitlinear: Determine Linear Regression Coefficients from Dose-Effect Data

Description

Determine coefficients (intercept and slope) from dose-effect data using simple linear regression on the log10 dose vs. probit effect scale.

Usage

fitlinear(DEdata, constr = c(1e-04, 0.9999))

Arguments

DEdata
A data frame of dose-effect data (typically, the output from dataprep) containing at least three variables: log10dose, bitpfx, and LWkeep.
constr
A numeric vector of length two, indicating the constraints (see constrain) applied to the proportional effects, default c(0.0001, 0.9999).

Value

A numeric vector of length two, the estimated intercept and slope.

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)
mydat <- dataprep(dose=conc, ntot=numtested, nfx=nalive)
fitlinear(mydat)

Run the code above in your browser using DataLab