Learn R Programming

npsm (version 2.0.0)

aligned.test: Aligned Rank Test

Description

Aligned rank test for a group/treatment effect after adjusting for covariates.

Usage

aligned.test(x, y, g, scores = Rfit::wscores,...)

Value

statistic

The value of the test statistic.

p.value

The p-value based on a chisq(k-1) distribution where k is the number of groups/treatments.

Arguments

x

n by p design matrix

y

n by 1 response vector

g

n by 1 vector denoting group/treatment membership.

scores

Which scores should be used for the fit and the test. An object of class scores.

...

optional arguments. passed to rfit.

Author

John Kloke

Details

Data are aligned based on the design matrix x using a rank-based fit via rfit.

References

Hettmansperger, T.P. and McKean J.W. (2011), Robust Nonparametric Statistical Methods, 2nd ed., New York: Chapman-Hall.

See Also

rfit

Examples

Run this code
y<-rt(30,2)
x<-runif(30)
g<-rep(1:3,each=10)
aligned.test(x,y,g)

Run the code above in your browser using DataLab