Assess Normality of Individual Gene Set Scores
brainscore.normality.RdThis function reports normality diagnostics for individual-level gene set scores. The diagnostics are intended to guide downstream model choice and are not used as automatic exclusion criteria.
Usage
brainscore.normality(
gsScore,
method = c("ks", "shapiro", "both"),
alpha = 0.05,
p_adjust_method = "fdr",
shapiro_max_n = 5000,
seed = NULL
)Arguments
- gsScore
A data frame, matrix, or empirical
brainscore()output list containing individual gene set scores, with subjects/participants as rows and gene sets as columns.- method
Character string specifying the normality diagnostic method. Default is
"ks". Other options are"shapiro"and"both".- alpha
Numeric significance threshold used to flag non-normal score distributions after p-value adjustment. Default is 0.05.
- p_adjust_method
Character string specifying the method for p-value adjustment. Default is
"fdr". Seestats::p.adjust()for details.- shapiro_max_n
Maximum sample size used for Shapiro-Wilk tests.
stats::shapiro.testsupports at most 5000 observations. Default is 5000.- seed
Optional random seed used when subsampling observations for Shapiro-Wilk tests with more than
shapiro_max_nobservations.