drmHetVar: Dose response modeling with heterogeneous variance

View source: R/drmHetVar.R

drmHetVarR Documentation

Dose response modeling with heterogeneous variance

Description

Add a heterogeneous variance structure to an existing drc object.

Usage

drmHetVar(object, var.formula)

Arguments

object

dose-response model of class drcHetVar

var.formula

one-sided formula specifying the dependance of the dose values and/or the fitted values on the point-wise standard error

Details

The aim to provide an R package calculating the benchmark dose (BMD) and the lower limit of the corresponding 95% confidence interval (BMDL) for continuous and quantal dose-response data for a range of dose-response models based on the available definitions of the benchmark dose concepts.

REFERENCES TO BE ADDED/WRITTEN

Value

dose-response model with a heterogeneous variance structure of class drcHetVar.

The primary objective is to use this model for benchmark dose estimation based on the hybrid method with a heterogeneous variance structure.

A plot method is available, which can be useful for assessing the fit of the variance structure.

Author(s)

Signe M. Jensen and Jens Riis Baalkilde

Examples

library(drc)
library(drcData)
library(bmd)
# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.

# ryegrass data
ryegrass.LL.4 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
set.seed(123)
ryegrass.LL.4.hetVar <- drmHetVar(ryegrass.LL.4, ~ fitted + I(fitted^2))
plot(ryegrass.LL.4.hetVar)
bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)

# barley data
barley.LL.4 <- drm(weight ~ Dose, data = barley, fct = LL.4())
set.seed(123)
barley.LL.4.hetVar <- drmHetVar(barley.LL.4, ~ fitted + I(fitted^2))
plot(barley.LL.4.hetVar)
bmdHetVar(barley.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)
bmdHetVar(barley.LL.4.hetVar, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)

# GiantKelp data
GiantKelp.LL.4 <- drm(tubeLength ~ dose, data = GiantKelp, fct = LL.4())
set.seed(123)
GiantKelp.LL.4.hetVarSq <- drmHetVar(GiantKelp.LL.4, ~ fitted + I(fitted^2))
plot(GiantKelp.LL.4.hetVarSq)
bmdHetVar(GiantKelp.LL.4.hetVarSq, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)
bmdHetVar(GiantKelp.LL.4.hetVarSq, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)

GiantKelp.LL.4.hetVarLogSq <- drmHetVar(GiantKelp.LL.4, ~ log(dose+1) + I(log(dose+1)^2))
plot(GiantKelp.LL.4.hetVarLogSq)
bmdHetVar(GiantKelp.LL.4.hetVarLogSq, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)
bmdHetVar(GiantKelp.LL.4.hetVarLogSq, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc", R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE)




DoseResponse/bmd documentation built on March 29, 2025, 4:36 p.m.