title | author | date | output | ||||
---|---|---|---|---|---|---|---|
`rcorr()` test |
Mara Averick |
6/25/2019 |
|
library(Hmisc)
## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## Loading required package: ggplot2
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:base':
##
## format.pval, units
x <- c(-2, -1, 0, 1, 2)
y <- c(4, 1, 0, 1, 4)
z <- c(1, 2, 3, 4, NA)
v <- c(1, 2, 3, 4, 5)
rcorr(cbind(x,y,z,v))
## x y z v
## x 1 0.00 1.00 1
## y 0 1.00 -0.75 0
## z 1 -0.75 1.00 1
## v 1 0.00 1.00 1
##
## n
## x y z v
## x 5 5 4 5
## y 5 5 4 5
## z 4 4 4 4
## v 5 5 4 5
##
## P
## x y z v
## x 1.0000 0.0000 0.0000
## y 1.0000 0.2546 1.0000
## z 0.0000 0.2546 0.0000
## v 0.0000 1.0000 0.0000