limma_mrlm: function to retrieve the contrasts stored in a dataset and...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/limma.R

Description

this function is a wrapper and an adapter around 'aov', it retrieves the contrasts for each independent variable specified in an aov() model and stored in the original dataset, and fits an ANOVA model on all contrasts for each independent variable, in order to obtained the computed SS and MS for further calculations, otherwise not available from the original ANOVA model as displayed by summary() or summary.lm(), the model fitted for all contrasts of one variable is the same as displayed by summary.lm() on the original ANOVA model

Usage

1
limma_mrlm(M, design = NULL, ndups = 1, spacing = 1, weights = NULL, ...)

Arguments

anova

an object of class anova data.frame with the ANOVA model created by aov(), in the original dataset each variable must be in only one column, and all contrasts for each variable should be loaded as contrasts for that variable

Value

a list with components

coefficients numeric matrix containing the estimated coefficients for each linear model (same number of rows as M, same number of columns as design)
stdev.unscaled numeric matrix conformal with coef containing the unscaled standard deviations for the coefficient estimators, the standard errors are given by stdev.unscaled*sigma
sigma numeric vector containing the residual standard deviation for each gene
df.residual numeric vector giving the degrees of freedom corresponding to sigma
correlation inter-duplicate or inter-block correlation
qr QR decomposition of the generalized linear squares problem, i.e. the decomposition of design standardized by the Choleski-root of the correlation matrix defined by correlation
effects numeric matrix containing the estimated effects for each linear model (same number of rows and columns as M)
residuals numeric matrix containing the estimated residuals for each linear model (same number of rows and columns as M)

Author(s)

gerardo esteban antonicelli

See Also

'check_contrasts' 'omega_factorial'

Examples

1
2
3
4
5
6
7
8
data(gogglesData)
data(depressionData)
goggles.model <- aov(attractiveness ~ gender + alcohol + gender:alcohol, data=gogglesData)
simple.model <- aov(attractiveness ~ simple, data=gogglesData)
depression.model <- aov(diff ~ treat, data=depressionData)
fit_aov(goggles.model)
fit_aov(simple.model)
fit_aov(depression.model)

geantonicelli/GLM documentation built on Dec. 15, 2020, 3:05 p.m.