Learn R Programming

drc (version 4.0-0)

neill.test: Neill's lack-of-fit test for dose-response models

Description

'neill.test' provides a lack-of-fit test for non-linear regression models. It is applicable both in cases where there are replicates (in which case it reduces to the standard lack-of-fit test against an ANOVA model) and in cases where there are no replicates, though then a grouping has to be provided.

Usage

neill.test(object, grouping, method = c("c-finest", "finest", "percentiles"), 
  breakp = NULL, display = TRUE)

Value

The function returns an object of class anova which is displayed using print.anova.

Arguments

object

object of class 'drc' or 'nls'.

grouping

character or numeric vector that provides the grouping of the dose values.

method

character string specifying the method to be used to generate a grouping of the dose values.

breakp

numeric vector of break points for generating dose intervals that form a grouping.

display

logical. If TRUE results are displayed. Otherwise they are not (useful in simulations).

Author

Christian Ritz

Details

The functions used the methods df.residual and residuals and the 'data' component of object (only for determining the number of observations).

References

Neill, J. W. (1988) Testing for lack of fit in nonlinear regression, Ann. Statist., 16, 733--740

See Also

See also modelFit for details on the lack-of-fit test against an ANOVA model.

Examples

Run this code

### Example with 'drc' object

## Lack-of-fit test against ANOVA
ryegrass.m1 <-drm(rootl~conc, data = ryegrass, fct = LL.4())
modelFit(ryegrass.m1)

## The same test using 'neill.test'
neill.test(ryegrass.m1, ryegrass$conc)

## Generating a grouping
neill.test(ryegrass.m1, method="c-finest")
neill.test(ryegrass.m1, method="finest")
neill.test(ryegrass.m1, method="perc")


Run the code above in your browser using DataLab