nparsurv_test: Nonparametric Tests for Main Effects, Simple Effects and...

Description Usage Arguments Details Value References Examples

Description

The nparsurv_test function calculates the test statistics and the p-values as described in 'Nonparametric Methods for Factorial Designs with Censored Data' by Akritas and Brunner.

Usage

1

Arguments

data

A data.frame of the form (time, status, factorA, factorB)

time:

time of event or censoring, numeric

status:

indicator for censoring, 1=event, 0=censored, integer

factorA:

first factor variable, factor

factorB:

second factor variable, factor

Missing values must be saved as NA.

Details

The package provides tests for a survival setting with two influencing variables, that are factors with at least two levels each. Details are shown in 'Nonparametric Methods for Factorial Designs with Censored Data' by Akritas and Brunner. The nparsurv_test function returns the values of the five test statistics: the tests for main effects, simple effects and the interaction effect. Additionally, based on the asymptotic chi-square distribution of the test statistic under the nullhypothesis, p-values are computed.

Value

A nparsurv_test object containing the following components:

maineffectA / maineffectB

The test statistic and p-value for the nullhypotheses 'no main effect of factor A' and 'no main effect of factor B' respectively.

simpleeffectA / simpleeffectB

The test statistic and p-value for the null hypotheses 'no simple effect of factor A' and 'no simple effect of factor B' respectively.

interactioneffect

The test statistic and p-value for the null hypothesis 'no interaction effect between factor A and factor B'.

References

Michael G. Akritas, Edgar Brunner(1997). Nonparametric Methods for Factorial Designs with Censored Data. Journal of the American Statistical Association.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_ovarian<-data.frame(survival::ovarian$futime,
                       survival::ovarian$fustat,
                       as.factor(survival::ovarian$resid.ds),
                       as.factor(survival::ovarian$rx))
nparsurv_test(data_ovarian)

data_GBSG2<-data.frame(TH.data::GBSG2$time,
                       TH.data::GBSG2$cens,
                       TH.data::GBSG2$tgrade,
                       TH.data::GBSG2$horTh)
nparsurv_test(data_GBSG2)

nparsurv documentation built on May 2, 2019, 3:27 a.m.