betaSignCongruence: Calculate sign congruence of fixed effects (betas) between...

View source: R/func__betaSignCongruence.R

betaSignCongruenceR Documentation

Calculate sign congruence of fixed effects (betas) between linear mixed models (LMMs) and penalised logistic models (PLMs)

Description

This function calculates the percentage of matched fixed effects having the same sign. The outcome can be visualised as a scatter plot or so.

Usage

betaSignCongruence(lmms, plms, p.max = 1, step = 5e-04, nevLog = TRUE)

Arguments

lmms

A data frame from the function lmm for association status between patterns. Assuming assoc = lmm(...), then lmms = assoc$lmms.pat$dif$h1.

plms

A data frame from the function plr for association status between patterns. Assuming assoc = plr(...), then plms = assoc$pat. Pattern orders for association tests must match to those in lmms. Otherwise, both data frames cannot merge correctly.

p.max

Upper bound of raw p-values for congruence assessment.

step

Step size of betas for calculating the congruence percentage.

nevLog

A logical argument determining whether -log10 will be applied to p-values in the result.

Value

A data frame of percentages as measurements of sign congruence.

Author(s)

Yu Wan (wanyuac@126.com)

Examples

sg <- betaSignCongruence(lmms = assoc_lmm$lmms.pat$dif$h1,
plms = assoc_lgr$pat, p.max = 1, step = 0.0005, nevLog = TRUE)


wanyuac/GeneMates documentation built on Aug. 12, 2022, 7:37 a.m.