Learn R Programming

PairedData (version 1.1.1)

imam.Var.test: Imam test of scale for paired samples

Description

Robust test of scale for paired samples based on absolute deviations from the trimmed means (or medians), called Imam test in Wilcox (1989).

Usage

imam.Var.test(x, ...)

# S3 method for default imam.Var.test(x, y = NULL, alternative = c("two.sided", "less", "greater"), mu = 0,conf.level = 0.95,location=c("trim","median"), tr=0.1, ...)

# S3 method for paired imam.Var.test(x, ...)

Arguments

x

first sample or object of class paired.

y

second sample.

alternative

alternative hypothesis.

mu

the location parameter mu.

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.

Value

A list with class "htest" containing the components of a paired t test.

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 paired t test is then carried out on the (global) ranks of X and Y.

References

  • Wilcox, R.R. (1989) Comparing the variances of dependent groups. Psychometrika, 54, 305-315.

  • Conover, W.J. and Iman, R.L. (1981) Rank transformations as a bridge between parametric and nonparametric statistics. The American Statistician, 35, 124-129.

See Also

Var.test, grambsch.Var.test

Examples

Run this code
# NOT RUN {
z<-rnorm(20)
x<-rnorm(20)+z
y<-(rnorm(20)+z)*2
imam.Var.test(x,y)

# some variations
imam.Var.test(x,y,tr=0.2)
imam.Var.test(x,y,location="median")

data(anscombe2)
p<-with(anscombe2,paired(X1,Y1))
imam.Var.test(p)
# }

Run the code above in your browser using DataLab