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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/global1.R

Description

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

Usage

1
2
3
4
5
6
7
8
winsor.cor.test(x, ...)

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


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

Author(s)

Stephane Champely

See Also

cor.test

Examples

1
2
3

Example output

Loading required package: MASS
Loading required package: gld
Loading required package: mvtnorm
Loading required package: lattice
Loading required package: ggplot2

Attaching package: 'PairedData'

The following object is masked from 'package:base':

    summary


	winsorized correlation, trim=0.2

data:  PSSbefore and PSSafter
t = 1.8791, df = 14, p-value = 0.0812
alternative hypothesis: true (winsorized) correlation is not equal to 0
sample estimates:
     cor 
0.358135 


	winsorized correlation, trim=0.2

data:  PSSbefore and PSSafter
t = 1.8791, df = 14, p-value = 0.0812
alternative hypothesis: true (winsorized) correlation is not equal to 0
sample estimates:
     cor 
0.358135 

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