mixed_effects_anova: Mixed Effects ANOVA

Description Usage Arguments Value Examples

View source: R/mixed_effects_anova.R

Description

A wrapper around lme4::lmer functionality.

Usage

1
mixed_effects_anova(m, alt_model, test_factor, order_by = c("none", "p-value"))

Arguments

m

ExpressionSet or MSnSet object

alt_model

character formulation of alternative model

test_factor

name of the tested factor

order_by

"none" or "p-value". Default is "none".

Value

data.frame

feature

protein or feature names in general. Should be as in sampleNames(m).

p.val

ANOVA p-value

p.adj

Benjamini-Hochberg adjusted p-value

q.val

q-value. Parameters for qvalue() are: lambda=0.05, pi0.method="bootstrap"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(srm_msnset)
# -- make sure the factors are factors (not characters or integers)
# This is intentionally left for user's control.
msnset$subject.type <- as.factor(msnset$subject.type)
msnset$match.group <- as.factor(msnset$match.group)
msnset$PrepBatch <- as.factor(msnset$PrepBatch)
# -- model description
# subject.type - fixed effect
# match.group - random effect affecting the intercept
# PlateCol - another random effect influencing intercept
out <- mixed_effects_anova(msnset, 
                           alt_model="~ subject.type + (1|match.group) + (1|PrepBatch)", 
                           test_factor="subject.type",
                           order_by="p-value")
head(out)

vladpetyuk/vp.misc documentation built on June 25, 2021, 6:35 a.m.