stepDownTrendTest: Step Down Trend Tests

View source: R/stepDownTrendTest.R

stepDownTrendTestR Documentation

Step Down Trend Tests

Description

Performs step-down trend test procedures for monotone responses to detect NOEC (LOEC) according to OECD (2006).

Usage

stepDownTrendTest(x, ...)

## Default S3 method:
stepDownTrendTest(
  x,
  g,
  test = c("leTest", "spearmanTest", "jonckheereTest", "cuzickTest", "chackoTest",
    "johnsonTest"),
  alternative = c("two.sided", "greater", "less"),
  continuity = FALSE,
  ...
)

## S3 method for class 'formula'
stepDownTrendTest(
  formula,
  data,
  subset,
  na.action,
  test = c("leTest", "spearmanTest", "jonckheereTest", "cuzickTest", "chackoTest",
    "johnsonTest"),
  alternative = c("two.sided", "greater", "less"),
  continuity = FALSE,
  ...
)

Arguments

x

a numeric vector of data values, or a list of numeric data vectors.

...

further arguments to be passed to or from methods.

g

a vector or factor object giving the group for the corresponding elements of "x". Ignored with a warning if "x" is a list.

test

the trend test that shall be performed. Defaults to "leTest".

alternative

the alternative hypothesis. Defaults to "two.sided".

continuity

logical indicator whether a continuity correction shall be performed. Only relevant for "jonckheereTest". Defaults to FALSE.

formula

a formula of the form response ~ group where response gives the data values and group a vector or factor of the corresponding groups.

data

an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula).

subset

an optional vector specifying a subset of observations to be used.

na.action

a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").

Details

According to OECD 2006 one can perform a test for trend on responses from all dose groups including the control. If the trend test is significant at the 0.05 level, the high dose group is omitted, and the trend statistic with the remaining dose groups is re-compute The procedure is continued until the trend test is first non-significant at the 0.05 level, then stop.

The NOEC is the highest dose remaining at this stage. If this test is significant when only the lowest dose and control remain, then a NOEC cannot be established from the data.

Value

A list with class "trendPMCMR" containing the following components:

method

a character string indicating what type of test was performed.

data.name

a character string giving the name(s) of the data.

statistic

lower-triangle matrix of the estimated quantiles of the pairwise test statistics.

p.value

lower-triangle matrix of the p-values for the pairwise tests.

alternative

a character string describing the alternative hypothesis.

p.adjust.method

a character string describing the method for p-value adjustment.

dist

a string that denotes the test distribution.

Note

Factor labels for g must be assigned in such a way, that they can be increasingly ordered from zero-dose control to the highest dose level, e.g. integers {0, 1, 2, ..., k} or letters {a, b, c, ...}. Otherwise the function may not select the correct values for intended zero-dose control.

It is safer, to i) label the factor levels as given above, and to ii) sort the data according to increasing dose-levels prior to call the function (see order, factor).

References

OECD (2006) Current Approaches in the Statistical Analysis of Ecotoxicity Data: A Guidance to Application, OECD Series on Testing and Assessment 52, Paris: Organisation for Econonomic Co-operation and Development.

See Also

leTest, jonckheereTest, spearmanTest, cuzickTest, chackoTest, johnsonTest

Examples

res <- stepDownTrendTest(Y ~ DOSE, data = trout,
                         test = "jonckheereTest",
                         alternative = "less")
## print method
res
## summary method
summary(res)

PMCMRplus documentation built on May 29, 2024, 8:34 a.m.