Description Usage Arguments Details Value Note Author(s) References See Also Examples
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.
1 |
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. |
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.
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).
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.
Christian Ritz
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 modelFit
for details on the related lack-of-fit test against an ANOVA model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.