score: Generating van der Waerden and Exponential Scores

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/score.R

Description

Generates van der Waerden scores (i.e., normal quantiles) and exponential (similar to Savage) scores, for combined data x and y.

Usage

1
 score(x, y = NULL, expon = FALSE) 

Arguments

x

A positive integer equal to the number of desired scores when y is NULL, or x is a vector of observations.

y

An optional vector of observations, typically used with two-sample tests.

expon

Logical; if FALSE (default), van der Waerden scores are computed, even for ties. If TRUE, Exponential scores are computed, and interpolation is used for ties.

Details

The scored values for x are the output, when y is NULL.

Value

x

Scored values for x, when y is not NULL.

y

Scored values for y, when y is not NULL.

Note

The formulas computed within score are based on the textbook by Higgins (2004).

Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA

References

Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.

Examples

1
2
3
4
5
score( 10 )

score( 15, expon=TRUE )

score( c(4,7,6,22,13), c(15,16,7) )  # Two samples, including a tie. 

Example output

 [1] -1.3351777 -0.9084579 -0.6045853 -0.3487557 -0.1141853  0.1141853
 [7]  0.3487557  0.6045853  0.9084579  1.3351777
 [1] 0.06666667 0.13809524 0.21501832 0.29835165 0.38926074 0.48926074
 [7] 0.60037185 0.72537185 0.86822899 1.03489566 1.23489566 1.48489566
[13] 1.81822899 2.31822899 3.31822899
$x
[1] -1.2206403 -0.2822161 -0.7647097  1.2206403  0.1397103

$y
[1]  0.4307273  0.7647097 -0.2822161

jmuOutlier documentation built on Aug. 6, 2019, 1:03 a.m.