groupings: Combinatorial groups matrix generator

View source: R/groupings.R

groupingsR Documentation

Combinatorial groups matrix generator

Description

Generates a combinatorial grouping matrix based on the decaydata data.frame.

Usage

groupings(decaydata)

Arguments

decaydata

a data.frame with column names: 'geneID','treatment','t.decay','rep','value' with classes factor, factor, numeric, factor, numeric

Details

The resulting matrix of indices is used to constrain treatment alphas or treatment betas in combination. For example, in one model, treatment alphas might be allowed to vary independently (gp1), but the beta models might be constrained to be equal for some treatments indicated by haveing the same index number (other gp).

Value

returns a matrix of equivalence group indicies based on the number of levels in the 'treatment' column (max of 4).

Examples

groupings(data.frame(geneID=paste0('gene',1:4),treatment=as.factor(paste0('treat',1:4)),
                     t.decay=0:3,rep=rep('rep1'),value=c(1,0.5,0.25,0.12)))


reedssorenson/RNAdecay documentation built on Oct. 28, 2023, 11:31 a.m.