corrCompare: corrCompare

Description Usage Arguments Value Examples

Description

corrCompare computes a correlation table for each level of a binary grouping variable separately, and then tests differences in correlation coefficients between grouping variables

Usage

1
2
corrCompare(data = NULL, group = NULL, method = "pearson", rdec = 3,
  pdec = 3, tdec = 3)

Arguments

data

data.frame containing 1 grouping variable and all variables to be used to compute a correlation table

group

variable name of the grouping variable

method

correlation method: pearson or spearman

rdec

number of decimals for correlation coefficients

pdec

number of decimals for p-values

tdec

number of decimals for t-values

Value

A data.frame containing group level correlation coefficients as well as relevant tests between groups.

Examples

1
2
3
4
5
6
7
#dat<-data.frame(g<-rep(c(1,2),50),
#                v2<-rnorm(100,5,1),
#                v1<-rnorm(100,2,1),
#                v3<-rnorm(100,499,12))
#names(dat) <- c("g","v1","v2","v3")
#jf <- corrCompare(data=dat, group="g")
#View(jf)

TaylorAndrew/atAnalyze documentation built on May 9, 2019, 4:21 p.m.