mcculloch.Var.test: McCulloch test of scale for paired samples

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

View source: R/global1.R

Description

Robust test of scale for paired samples based on spearman coefficient (the default, or kendall or pearson) of the transformed D=x-y and S=x+y.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mcculloch.Var.test(x, ...)

## Default S3 method:
mcculloch.Var.test(x, y = NULL,

alternative = c("two.sided", "less", "greater"),

method= c("spearman","pearson", "kendall"),

exact = NULL,conf.level = 0.95,continuity = FALSE, ...)

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

Arguments

x

first sample or object of class paired.

y

second sample.

alternative

alternative hypothesis.

method

a character string indicating which correlation coefficient is to be used for the test. One of "spearman", "kendall", or "pearson", can be abbreviated.

exact

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

conf.level

confidence level.

continuity

logical: if true, a continuity correction is used for Spearman's rho when not computed exactly.

...

further arguments to be passed to or from methods.

Value

A list with class "htest" containing the components of a (Spearman) correlation test.

Author(s)

Stephane CHAMPELY

References

McCulloch, C.E. (1987) Tests for equality of variances for paired data. Communications in Statistics - Theory and Methods, 16, 1377-1391.

See Also

Var.test, grambsch.Var.test

Examples

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

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

# A variation with kendall tau
mcculloch.Var.test(p,method="kendall")

# equivalence with the PitmanMorgan test
mcculloch.Var.test(p,method="pearson")
Var.test(p)

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