Learn R Programming

PairedData (version 1.1.1)

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

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

mcculloch.Var.test(x, ...)

# S3 method for default 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 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.

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

Run this code
# NOT RUN {
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)


# }

Run the code above in your browser using DataLab