sandvikolsson.Var.test: Sandvik-Olsson test of scale for paired samples

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

View source: R/global1.R

Description

Robust test of scale for paired samples based on the absolute deviations from the trimmed means (or medians).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sandvikolsson.Var.test(x, ...)

## Default S3 method:
sandvikolsson.Var.test(x, y = NULL,
            alternative = c("two.sided", "less", "greater"),
            mu = 0, exact = NULL, correct = TRUE,
            conf.int = FALSE, conf.level = 0.95,location=c("trim","median"),tr=0.1, ...)

## S3 method for class 'paired'
sandvikolsson.Var.test(x, ...)

Arguments

x

first sample or object of class paired.

y

second sample.

alternative

alternative hypothesis.

mu

the location parameter mu.

exact

a logical indicating whether an exact p-value should be computed.

correct

a logical indicating whether to apply continuity correction in the normal approximation for the p-value.

conf.int

a logical indicating whether a confidence interval should be computed.

conf.level

confidence level.

location

location parameter for centering: trimmed mean or median.

tr

percentage of trimming.

...

further arguments to be passed to or from methods.

Details

The data are transformed as deviations from the trimmed mean: X=abs(x-mean(x,tr=0.1)) and Y=(y-mean(y,tr=0.1)). A wilcoxon signed-rank test is then carried out on X and Y.

Value

A list with class "htest" containing the components of a wilcoxon signed-rank test.

Author(s)

Stephane CHAMPELY

References

Sandvik, L. and Olsson, B. (1982) A nearly distribution-free test for comparing dispersion in paired samples. Biometrika, 69, 484-485.

See Also

Var.test, grambsch.Var.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
z<-rnorm(20)
x<-rnorm(20)+z
y<-(rnorm(20)+z)*2
sandvikolsson.Var.test(x,y)

p<-paired(x,y)
sandvikolsson.Var.test(p)


# some variations
sandvikolsson.Var.test(p,tr=0.2)
sandvikolsson.Var.test(p,location="median")

PairedData documentation built on May 1, 2019, 6:49 p.m.