Learn R Programming

PairedData (version 1.1.1)

winsor.cor.test: Winsorized correlation test (for paired data)

Description

Test for association between paired samples, using winsorized correlation coefficient.

Usage

winsor.cor.test(x, ...)

# S3 method for default winsor.cor.test(x, y, tr=0.2,alternative = c("two.sided", "less", "greater"), ...)

# S3 method for paired winsor.cor.test(x,tr=0.2,alternative = c("two.sided", "less", "greater"), ...)

Arguments

x

an object of class paired or the first variable.

y

second variable.

tr

percentage of winsorizing.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

further arguments to be passed to or from methods.

Value

A list with class "htest" containing the following components:

statistic

the value of the t-statistic.

parameter

the degrees of freedom for the t-statistic.

p.value

the p-value for the test.

estimate

the winsorized correlation.

null.value

the specified hypothesized value of the winsorized correlation (=0).

alternative

a character string describing the alternative hypothesis.

data.name

a character string giving the name(s) of the data.

See Also

cor.test

Examples

Run this code
# NOT RUN {
data(PrisonStress)
with(PrisonStress,winsor.cor.test(PSSbefore,PSSafter))
with(PrisonStress,winsor.cor.test(paired(PSSbefore,PSSafter)))
# }

Run the code above in your browser using DataLab