This function provides a high-dimensional analysis of variance (HDANOVA) method
which can be used alone or as part of a larger analysis, e.g., ASCA, APCA, LiMM-PCA, MSCA or PC-ANOVA. It
can be called directly or through the convenince functions asca
, apca
,
limmpca
, msca
and pcanova
.
hdanova(
formula,
data,
subset,
weights,
na.action,
family,
unrestricted = FALSE,
add_error = FALSE,
aug_error = "denominator",
use_ED = FALSE,
pca.in = FALSE,
contrasts = "contr.sum",
coding,
equal_baseline = FALSE,
SStype = "II",
REML = NULL,
scale = FALSE
)
An hdanova
object containing loadings, scores, explained variances, etc. The object has
associated plotting (asca_plots
) and result (asca_results
) functions.
Model formula accepting a single response (block) and predictors. See Details for more information.
The data set to analyse.
Expression for subsetting the data before modelling.
Optional object weights.
How to handle NAs (no action implemented).
Error distributions and link function for Generalized Linear Models.
Use unrestricted ANOVA decomposition (default = FALSE).
Add error to LS means, e.g., for APCA.
Augment score matrices in backprojection. Default = "denominator" (of F test), "residual" (force error term), nueric value (alpha-value in LiMM-PCA).
Use "effective dimensions" for score rescaling in LiMM-PCA.
Compress response before ASCA (number of components).
Effect coding: "contr.sum" (default = sum-coding), "contr.weighted" (not for lme4 models), "contr.reference", "contr.treatment".
Defunct. Use 'contrasts' instead.
Experimental: Set to TRUE
to let interactions, where a main effect is missing,
e.g., a nested model, be handled with the same baseline as a cross effect model. If TRUE
the corresponding
interactions will be put in quotation marks and included in the model.frame
.
Type of sum-of-squares: "I" = sequential, "II" (default) = last term, obeying marginality, "III" = last term, not obeying marginality.
Parameter to mixlm: NULL (default) = sum-of-squares, TRUE = REML, FALSE = ML.
Scaling of the response matrix. Defaults to FALSE
(no scaling). For alternatives, see Details.
Scaling of the response matrix can be done by setting the scale
parameter. If scale=TRUE
,
each column is scaled by its standard deviation (autoscaling). A numeric value can be provided to scale
the columns by specific quantities. If scale
is a character string, the first element
is interpreted as a factor name and the second element is interpreted as a factor level, whose samples
the standard deviations are calculated from (reference group scaling).
# Load candies data
data(candies)
# Basic HDANOVA model with two factors
mod <- hdanova(assessment ~ candy + assessor, data=candies)
summary(mod)
Run the code above in your browser using DataLab