shuffle_designMat_by_group: Shuffle a variable in a design matrix within studies or...

View source: R/shuffle_designMat_by_group.R

shuffle_designMat_by_groupR Documentation

Shuffle a variable in a design matrix within studies or groups

Description

This function is designed to shuffle annotation data among samples within studies or groups. It is designed to test the effect of assocations between variables across studies or groups, by allowing comparison of the trend recovered if all relationships within the data are retained EXCEPT FOR the values of the variable of interest.

Usage

shuffle_designMat_by_group(designMat, shuffle_col, group_cols)

Arguments

designMat

a design matrix.

shuffle_col

the name or number of the column of designMat to shuffle.

group_cols

the names or numbers of the columns of designMat corresponding to the groups/studies. Values of the shuffled column are resampled WITHIN group/study

Value

a design matrix, with dimentions identical to the input designMat


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.