compare_rs: compare_rs

View source: R/compare_rs.R

compare_rsR Documentation

compare_rs

Description

Compares two correlations. Currently, 'compare_rs()' only supports correlations that have one variable in common and that were calculated in the same sample.

Usage

compare_rs(
  cor_mat,
  predictors,
  outcome,
  test = "hittner2003",
  adjust.p = "none",
  threshold = 0.05
)

Arguments

cor_mat

a correlation matrix object created using the 'corr.test()' function from the 'psych' package.

predictors

a vector of strings indicating the names of the predictors.

outcome

a string indicating the name of the outcome variable.

test

a string indicating the type of test to use to compare the correlations. Defaults to hittner2003.

adjust.p

a string indicating what type of correction for multiple comparisons should be used. Defaults to "none."

threshold

a numeric scalar indicating the p-value that should be used to determine if two correlations are signficantly different from eachother. Defaults to .05.


camkay/panoply documentation built on Jan. 17, 2025, 6:31 a.m.