lin.test: Lack-of-fit test for the mean structure based on cumulated...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function provides a lack-of-fit test for the mean structure based on cumulated residuals from the model fit.

Usage

1
2
  lin.test(object, noksSim = 20, seed = 20070325, plotit = TRUE, 
  log = "", bp = 0.01, xlab, ylab, ylim, ...)

Arguments

object

object of class 'drc'.

noksSim

numeric specifying the number of simulations used to obtain the p-value.

seed

numeric specifying the seed value for the random number generator.

plotit

logical indicating whether or not the observed cumulated residual process should be plotted. Default is to plot the process.

log

character string which should contains '"x"' if the x axis is to be logarithmic, '"y"' if the y axis is to be logarithmic and '"xy"' or '"yx"' if both axes are to be logarithmic. The default is "x". The empty string "" yields the original axes.

bp

numeric value specifying the break point below which the dose is zero (the amount of stretching on the dose axis above zero in order to create the visual illusion of a logarithmic scale including 0).

xlab

string character specifying an optional label for the x axis.

ylab

character string specifying an optional label for the y axis.

ylim

numeric vector of length two, containing the lower and upper limit for the y axis.

...

additional arguments to be passed further to the basic plot method.

Details

The function provides a graphical model checking of the mean structure in a dose-response model. The graphical display is supplemented by a p-value based on a supremum-type test.

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 mean structure is appropriate. Ritz and Martinussen (2009) provide the details.

Author(s)

Christian Ritz

References

Ritz, C and Martinussen, T. (2009) Lack-of-fit tests for assessing mean structures for continuous dose-response data, Submitted manuscript

See Also

Other available lack-of-fit tests are the Neill test (neill.test) and ANOVA-based test (modelFit).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Fitting a log-logistic model to the dataset 'etmotc'
etmotc.m1<-drm(rgr1~dose1, data=etmotc[1:15,], fct=LL.4())

## Test based on umulated residuals
lin.test(etmotc.m1, 1000)
#lin.test(etmotc.m1, 10000, plotit = FALSE)  # more precise

## Fitting an exponential model to the dataset 'O.mykiss'
O.mykiss.m1<-drm(weight~conc, data=O.mykiss, fct=EXD.2(), na.action=na.omit)

## ANOVA-based test
modelFit(O.mykiss.m1)

## Test based on umulated residuals
lin.test(O.mykiss.m1, log = "", cl = 0.2, xlab = "Dose (mg/l)", main = "B", ylim = c(-0.6, 0.6))
#lin.test(O.mykiss.m1, noksSim = 10000, plotit = FALSE)  # more precise

MaximeBSanofi/drc2 documentation built on Feb. 22, 2022, 12:02 a.m.