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

mr.test

Mizon-Richard test for dose-response models


Description

The function provides a lack-of-fit test for the mean structure based on the Mizon-Richard test as compared to a specific alternative model.

Usage

mr.test(object1, object2, object, x, var.equal = TRUE, component = 1)

Arguments

object1

object of class 'drc' (null model).

object2

object of class 'drc' (alternative model).

object

object of class 'drc' (fitted model under alternative).

x

numeric vector of dose values.

var.equal

logical indicating whether or not equal variances can be assumed across doses.

component

numeric vector specifying the component(s) in the parameter vector to use in the test.

Details

The function provides a p-value indicating whether or not the mean structure is appropriate.

The test is applicable even in cases where data are non-normal or exhibit variance heterogeneity.

Value

A p-value for test of the null hypothesis that the chosen mean structure is appropriate as compared to the alternative mean structure provided (see Ritz and Martinussen (2011) for a detailed explanation).

Note

This functionality is still experimental: Currently, the null and alternative models are hardcoded! In the future the function will be working for null and alternative models specified by the user.

Author(s)

Christian Ritz

References

Ritz, C and Martinussen, T. (2011) Lack-of-fit tests for assessing mean structures for continuous dose-response data, Environmental and Ecological Statistics, 18, 349–366

See Also

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

Examples

## Fitting log-logistic and Weibull models 
## The Weibull model is the alternative
etmotc.m1<-drm(rgr1~dose1, data=etmotc[1:15,], fct=LL.4())
etmotc.m2 <- update(etmotc.m1, fct=W1.4())

## Fitting the fitted model (using the alternative model)
etmotc.m3 <- drm(fitted(etmotc.m1)~dose1, data=etmotc[1:15,], fct=W1.4())

## Handling missing values
xVec <- etmotc[1:15,]$dose1
xVec[1:8] <- 1e-10  # avoiding 0's

## Obtaining the Mizon-Richard test
mr.test(etmotc.m1, etmotc.m2, etmotc.m3, xVec, var.equal = FALSE)

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.