X: Model based prediction

View source: R/8_fit_limma.R

XR Documentation

Model based prediction

Description

Model based prediction

Usage

X(
  object,
  formula = default_formula(object),
  drop = varlevels_dont_clash(object, all.vars(formula)),
  codingfun = contr.treatment.explicit
)

beta(object, fit = fits(object)[1])

Arguments

object

SummarizedExperiment or data.frame

formula

formula

drop

TRUE or FALSE

codingfun

function

fit

'limma', 'lm', 'lme', 'wilcoxon'

Value

beta matrix (nlevel x nfeature)

Examples

file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
object %<>% fit_limma(block = 'Subject')
beta(object)                    #    betas : nlevel x nfeature
   X(object)                    #   design : nlevel x nlevel
   X(object) %*% beta(object)   # response : nlevel x nfeature

bhagwataditya/importomics documentation built on Nov. 28, 2024, 8:28 a.m.