weighted_abs_mean_cors: Weighted Absolute Mean of Correlations

Description Usage Arguments Value Warning Examples

View source: R/weighted_abs_mean_cors.R

Description

Returns the weighted mean of the absolute value of the correlations (with Fisher's Z transformation applied if fisher_z_transform is left as TRUE).

Usage

1
weighted_abs_mean_cors(cors_mods, fisher_z_transform = TRUE)

Arguments

cors_mods

List of lists of mods and cors of the form returned by running piececor::piecewise_cors().

fisher_z_transform

Logical. Default is TRUE. If FALSE, simply calculates the means of cor weighted by n_obs for each dataframe in cors.

If TRUE applies Fisher's z transformation on correlations of individual segments prior to calculating weighted mean (then applies inverse).

Value

Dataframe with variables of interest in name column and weighted mean correlation (across segments) in value for each dataframe in cors_mods$cors.

Warning

See https://en.wikipedia.org/wiki/Fisher_transformation and https://www.researchgate.net/post/How-to-calculate-the-weighted-average-of-correlations-per-outcome for information on Fisher's z transformation. Appropriate methods for calculating weighted correlations should be further investigated.

Examples

1
# See README

brshallo/piececor documentation built on Dec. 19, 2021, 11:49 a.m.