dr4pl: Fitting 4 Parameter Logistic (4PL) models to dose-response...

Description Usage Arguments Details Value Methods (by class) Author(s) See Also Examples

Description

This function fits a 4PL model to dose-response data. Users can obtain fitted parameter estimates as return values. Using auxiliary functions provided by this R package, users can plot a fitted dose-response curve and obtain confidence intervals of true parameters. In addition, the goodness-of-fit test for model adequacy of the 4PL models can be performed when replicates are available for each dose level.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
dr4pl(...)

## S3 method for class 'formula'
dr4pl(formula, data = list(), init.parm = NULL,
  trend = "auto", method.init = "Mead", method.robust = NULL,
  method.optim = "Nelder-Mead", use.Hessian = FALSE, level = 0.9999,
  failure.message = FALSE, ...)

## Default S3 method:
dr4pl(dose, response, init.parm = NULL, trend = "auto",
  method.init = "Mead", method.robust = NULL,
  method.optim = "Nelder-Mead", use.Hessian = FALSE, level = 0.9999,
  failure.message = FALSE, ...)

Arguments

...

Further arguments to be passed to constrOptim.

formula

Symbolic description of the model to be fit. Either of the form 'response ~ dose' or as a data frame with response values in first column and dose values in second column.

data

Data frame containing variables in the model.

init.parm

Vector of initial parameters to be optimized in the model.

trend

Indicator of whether a dose-response curve is a decreasing θ[3]<0 or increasing curve θ[3]>0. The default is "auto" which indicates that the trend of the curve is automatically determined by data. The option "decreasing" will impose a restriction θ[3]<=0 while the option "increasing" will impose a restriction θ[3]>=0 in an optimization process.

method.init

Method of obtaining initial values of the parameters. If it is NULL, a default "Mead" method will be used. Assign "logistic" to use the logistic method.

method.robust

Parameter to select loss function for the robust estimation method to be used to fit a model. The argument NULL indicates the sum of squares loss, "absolute" indicates the absolute deviation loss, "Huber" indicates Huber's loss and "Tukey" indicates Tukey's biweight loss.

method.optim

Method of optimization of the loss function specified by method.robust. This function argument is directly passed to the function constrOptim which is provided in the base package of R.

use.Hessian

Indicator of whether the Hessian matrix (TRUE) or the gradient vector is used in the Hill bounds.

level

Confidence level to be used in Hill bounds computation.

failure.message

Indicator of whether a message indicating attainment of the Hill bounds and possible resolutions will be printed to the console (TRUE) or hidden (FALSE).

dose

Vector of dose levels

response

Vector of responses

Details

This function fits a 4 parameter logistic (4PL) model to dose-response data. A formula of the model is

θ[1]+(θ[4]-θ[1])/(1+(z/θ[2])^θ[3])

method.init specifies an initialization method to get initial parameter estimates based on data. The currently supported initialization methods are "logistic" and 'Mead'. For further details, see the vignette.

method.optim specifies an optimization method to be used in "constrOptim" function. The currently supported optimization techniques include "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN" and "Brent". For further details, see the help page of optim.

method.robust chooses a robust estimation method among 4 methods. The method of estimation is usually identified by the loss function of the method. This package supports 4 types of loss functions: sum-of-squares loss, absolute deviation loss, Huber's loss and Tukey's biweight loss. Each of loss function is explained in detail in the vignette.

Value

A 'dr4pl' object for which "confint", "gof", "print" and "summary" methods are implemented. For details, see the help page of each method. For example, type ?confint.dr4pl to obtain the confidence intervals of parameters of the 'dr4pl' object.

Methods (by class)

Author(s)

Hyowon An, ahwbest@gmail.com

Justin T. Landis, jtlandis314@gmail.com

Aubrey G. Bailey, aubreybailey@gmail.com

See Also

confint.dr4pl, gof.dr4pl, print.dr4pl, summary.dr4pl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
  a <- dr4pl(dose = sample_data_1$Dose, 
               response = sample_data_1$Response, 
               method.init = "logistic")
  plot(a)

  ##Assign method.init = "Mead" to use Mead's method of estimation. 
  # Use method.robust to select desired loss function
  b <- dr4pl(Response~Dose, 
               data = sample_data_4,
               method.init = "Mead", 
               method.robust = "Tukey" )
  plot(b)

  ##compatable with ggplot
  library(ggplot2)
  c <- dr4pl(Response~Dose, 
             data = drc_error_2,
             method.init = "Mead", 
             method.robust = "absolute" )
  d <- plot(c)
  d + scale_x_log10(breaks = c(.00135, .0135, .135, 1.35, 13.5))

ahwbest/dr4pl documentation built on May 30, 2019, 4:20 p.m.