rank.test: General scores rank test for two sample problem

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

View source: R/rank.test.r

Description

A generalization of the Wilcoxon rank-sum test where a score function is applied to the ranks. Any scores from Rfit can be used as well as user defined. Default is to perform a Wilcoxon analysis.

Usage

1
2
rank.test(x, y, alternative = "two.sided", scores = Rfit::wscores, 
  conf.int = FALSE, conf.level = 0.95)

Arguments

x

m x 1 vector

y

n x 1 vector

alternative

one of 'two.sided', 'less', or 'greater'

scores

an object of class scores

conf.int

logical indicating if a confidence interval should be estimated

conf.level

desired level of confidence for interval

Details

Test is based on T = sum_i a(R(y_i)) where R is the rank based on the combined sample and a(t) = varphi(t/(N+1)). Confidence interval, if requested, is based on call to Rfit.

Value

statistic

Standardized value of test statistics

Sphi

Test statistic

p.value

p-value

conf.int

confidence interval for shift in location

estimate

point estimate for shift in location

Author(s)

John Kloke [email protected], Joseph McKean

References

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

See Also

wilcox.test

Examples

1
rank.test(rt(20,1),rt(22,1)+0.2)

npsm documentation built on May 29, 2017, 12:12 p.m.