buildConfMat: Build confounder design matrices with and without intercepts

View source: R/buildConfMat.R

buildConfMatR Documentation

Build confounder design matrices with and without intercepts

Description

Build confounder design matrices with and without intercepts

Usage

buildConfMat(confounders)

Arguments

confounders

A dataframe of confounding variables #' For the preliminary trimming, we do not include an intercept, but we do include all the levels of the factors using contrasts=FALSE: we want to do the trimming in every subgroup, so no hidden reference levels For the filtering we just use a model with an intercept and treatment coding, here the interest is only in adjusting the offset

Value

a list with components

confModelMatTrim

A confounder matrix without intercept, with all levels of factors present. This will be used to trim out taxa that have zero abundances in any subgroup defined by confounders

confModelMat

A confounder matrix with intercept, and with reference levels for factors absent. This will be used to fit the model to modify the independence model, and may include continuous variables


CenterForStatistics-UGent/compIntegrate documentation built on Aug. 4, 2023, 1:08 p.m.