Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

boxcox.drc

Transform-both-sides Box-Cox transformation


Description

Finds the optimal Box-Cox transformation for non-linear regression.

Usage

## S3 method for class 'drc'
boxcox(object, lambda = seq(-2, 2, by = 0.25), plotit = TRUE, bcAdd = 0, 
method = c("ml", "anova"),  level = 0.95, eps = 1/50, 
xlab = expression(lambda), ylab = "log-Likelihood", ...)

Arguments

object

object of class drc.

lambda

numeric vector of lambda values; the default is (-2, 2) in steps of 0.25.

plotit

logical which controls whether the result should be plotted.

bcAdd

numeric value specifying the constant to be added on both sides prior to Box-Cox transformation. The default is 0.

method

character string specifying the estimation method for lambda: maximum likelihood or ANOVA-based (optimal lambda inherited from more general ANOVA model fit.

eps

numeric value: the tolerance for lambda = 0; defaults to 0.02.

level

numeric value: the confidence level required.

xlab

character string: the label on the x axis, defaults to "lambda".

ylab

character string: the label on the y axis, defaults to "log-likelihood".

...

additional graphical parameters.

Details

The optimal lambda value is determined using a profile likelihood approach: For each lambda value the dose-response regression model is fitted and the lambda value (and corresponding model fit) resulting in the largest value of the log likelihood function is chosen.

Value

An object of class "drc" (returned invisibly). If plotit = TRUE a plot of loglik vs lambda is shown indicating a confidence interval (by default 95 the optimal lambda value.

Author(s)

Christian Ritz

References

Carroll, R. J. and Ruppert, D. (1988) Transformation and Weighting in Regression, New York: Chapman and Hall (Chapter 4).

See Also

For linear regression the analogue is boxcox.

Examples

## Fitting log-logistic model without transformation
ryegrass.m1 <- drm(ryegrass, fct = LL.4())
summary(ryegrass.m1)

## Fitting the same model with the optimal Box-Cox transformation
ryegrass.m2 <- boxcox(ryegrass.m1)
summary(ryegrass.m2)

drc

Analysis of Dose-Response Curves

v3.0-1
GPL-2 | file LICENCE
Authors
Christian Ritz <ritz@bioassay.dk>, Jens C. Strebig <streibig@bioassay.dk>
Initial release
2016-08-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.