limmpca | R Documentation |
This function mimics parts of the LiMM-PCA framework, combining ASCA+ and linear mixed models to analyse high-dimensional designed data. The default is to use REML estimation and scaling of the backprojected errors. See examples for alternatives.
limmpca(
formula,
data,
pca.in = 5,
aug_error = 0.05,
use_ED = FALSE,
REML = TRUE,
contrasts = "contr.sum",
permute = FALSE,
perm.type = c("approximate", "exact"),
...
)
formula |
Model formula accepting a single response (block) and predictors. See Details for more information. |
data |
The data set to analyse. |
pca.in |
Compress response before ASCA (number of components), default = 5. |
aug_error |
Error term of model ("denominator", "residual", numeric alpha-value). The latter implies the first with a scaling factor. |
use_ED |
Use Effective Dimensions instead of degrees of freedom when scaling. |
REML |
Use restricted maximum likelihood estimation. Alternatives: TRUE (default), FALSE (ML), NULL (least squares). |
contrasts |
Effect coding: "sum" (default = sum-coding), "weighted", "reference", "treatment". |
permute |
Number of permutations to perform (default = 1000). |
perm.type |
Type of permutation to perform, either "approximate" or "exact" (default = "approximate"). |
... |
Additional arguments to |
An object of class limmpca
, inheriting from the general asca
class.
Martin, M. and Govaerts, B. (2020). LiMM-PCA: Combining ASCA+ and linear mixed models to analyse high-dimensional designed data. Journal of Chemometrics, 34(6), e3232.
Main methods: asca
, apca
, limmpca
, msca
, pcanova
, prc
and permanova
.
Workhorse function underpinning most methods: hdanova
.
Extraction of results and plotting: asca_results
, asca_plots
, pcanova_results
and pcanova_plots
# Load candies data
data(candies)
# Default LiMM-PCA model with two factors and interaction, 5 PCA components
mod <- limmpca(assessment ~ candy*r(assessor), data=candies)
summary(mod)
scoreplot(mod, factor = "candy")
# LiMM-PCA with least squares estimation and 8 PCA components
modLS <- limmpca(assessment ~ candy*r(assessor), data=candies, REML=NULL, pca.in=8)
summary(modLS)
scoreplot(modLS, factor = "candy")
# Load Caldana data
data(caldana)
# Combining effects in LiMM-PCA (assuming light is a random factor)
mod.comb <- limmpca(compounds ~ time + comb(r(light) + r(time:light)), data=caldana, pca.in=8)
summary(mod.comb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.