AnalyseCTP: Analysing a Closed Testing Procedure

Description Usage Arguments Details Value Note See Also Examples

View source: R/AnalyseCTP.R

Description

Calculation of p-values of a closed testing procedure (CTP). The function returns an object of oldClass "ctp"; summary() and Display() can be applied.

Usage

1
AnalyseCTP(ctp.struc, model, data, factor.name = NULL, test.name = "F", ...)

Arguments

ctp.struc

Object generated by the function IntersectHypotheses (structure of CTP)

model

model of the form response~treatment. If testname="F", the model can be extended by covariates and other factors. In the case of a Logrank test the response must be imputed as Surv(time,status).

data

Dataframe, missing values in the response or treatment variable are not allowed!

factor.name

Character string naming the factor whose levels are compared (treatment factor). By default the first variable of the right-hand side of the model formula is used.

test.name

One of the following strings

  • "F" - F-Test (ANOVA from linear model, default)

  • "glm" - generalised linear model

  • "kruskal" -Kruskal-Wallis-Test

  • "chisq" - Chi square test

  • "prob" - Fisher's exact test for total number of observations <200 else Chi square test

  • "lgrank" - Logrank-test

  • "jonckheere" - Jonckheere-Terpstra test of ordered alternatives

  • "glm" - generalised linear model, using function glm from stats.

...

Additional arguments for the chosen test.

Details

The hypothesis tree of the closed testing procedure must be created using IntersectHypotheses. For more details on the theory and the implementation as well for many examples, see the vignettes.

Value

An object of old class(ctp), consisting of a list with:

Note

This procedure is constructed for testing differences and two-sided hypotheses, but not for equivalence tests. It is further based on independent samples from the population involved (i.e. on parallel group designs, but not on cross-over designs).

See Also

IntersectHypotheses, Display, summary.ctp.str, summary.ctp, Adjust_raw

Examples

1
2
3
4
5
6
	data(pasi)
	three.to.first <- IntersectHypotheses(list(1:2,c(1,3),c(1,4)))
	Display(three.to.first)
	pasi.ctp.F1 <- AnalyseCTP(three.to.first,pasi.ch~dose,pasi)
	summary(pasi.ctp.F1)
	Display(pasi.ctp.F1)

CTP documentation built on April 27, 2021, 5:07 p.m.