Description Usage Arguments Details Value Note Author(s) References See Also Examples
General linear modeling of fixedeffects models with multiple responses is performed. The function calculates 5050 MANOVA pvalues, ordinary univariate pvalues and adjusted pvalues using rotation testing.
1 2 3 4 
formula 
Model formula. See "Note" below. 
data 
An optional data frame or list. 
stand 
Logical. Standardization of responses. This option has effect
on the 5050 MANOVA testing and the calculation of 
nSim 
nonnegative integer. The number of simulations to use in the rotation tests. Can be a single nonnegative integer or a list of values for each term. 
verbose 
Logical. If 
returnModel 
When 
returnY 
Response matrix, 
returnYhat 
Matrix 
returnYhatStd 
Standard errors, 
newdata 
Possible input to 
linComb 
Possible input to 
nonEstimableAsNA 
Will be used as input to 
outputClass 
When set to, 
An overall pvalue for all responses is calculated for each model term. This is done using the 5050 MANOVA method, which is a modified variant of classical MANOVA made to handle several highly correlated responses.
Ordinary single response pvalues are produced. By using rotation
testing these can be adjusted for multiplicity according to familywise error
rates or false discovery rates. Rotation testing is a Monte Carlo simulation
framework for doing exact significance testing under multivariate normality.
The number of simulation repetitions (nSim
) must be chosen.
Unbalance is handled by a variant of Type II sums of squares, which has several nice properties:
Invariant to ordering of the model terms.
Invariant to scale changes.
Invariant to how the overparameterization problem of categorical variable models is solved (how constraints are defined).
Whether twolevel factors are defined to be continuos or categorical does not influence the results.
Analysis of a polynomial model with a single experimental variable produce results equivalent to the results using an orthogonal polynomial.
In addition to significance testing an explained variance measure, which is based on sums of sums of squares, is computed for each model term.
An object of class "ffmanova"
, which consists of the
concatenated results from the underlying functions manova5050
,
rotationtests
and unitests
:
termNames 
model term names 
exVarSS 
explained variances calculated from sums of squares summed over all responses 
df 
degrees of freedom  adjusted for other terms in model 
df_om 
degrees of freedom  adjusted for terms contained in actual term 
nPC 
number of principal components used for testing 
nBU 
number of principal components used as buffer components 
exVarPC 
variance explained by

exVarBU 
variance explained by 
pValues 
5050 MANOVA pvalues 
stand 
logical. Whether the responses are standardised. 
stat 
The test statistics as tstatistics (when single degree of freedom) or Fstatistics 
pRaw 
matrix of ordinary pvalues from F or ttesting 
pAdjusted 
matrix of adjusted pvalues according to familywise error rates 
pAdjFDR 
matrix of adjusted pvalues according to false discovery rates 
simN 
number of simulations performed for each term (same as input) 
The matrices stat
, pRaw
, pAdjusted
and pAdjFDR
have one row for each model term and one column for each response.
According to the input parameters, additional elements can be included in output.
The model is specified with formula
, in the same way as in lm
(except that offsets are not supported). See lm
for details.
Input parameters formula
and data
will be interpreted by model.frame
.
<c3><98>yvind Langsrud and Bj<c3><b8>rnHelge Mevik
Langsrud, <c3><98>. (2002) 5050 Multivariate Analysis of Variance for Collinear Responses. The Statistician, 51, 305–317.
Langsrud, <c3><98>. (2003) ANOVA for Unbalanced Data: Use Type II Instead of Type III Sums of Squares. Statistics and Computing, 13, 163–167.
Langsrud, <c3><98>. (2005) Rotation Tests. Statistics and Computing, 15, 53–60.
Moen, B., Oust, A., Langsrud, <c3><98>., Dorrell, N., Gemma, L., Marsden, G.L., Hinds, J., Kohler, A., Wren, B.W. and Rudi, K. (2005) An explorative multifactor approach for investigating global survival mechanisms of Campylobacter jejuni under environmental conditions. Applied and Environmental Microbiology, 71, 20862094.
See also https://www.langsrud.com/stat/program.htm.
ffAnova
and predict.ffmanova
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49  data(dressing)
# An ANOVA model with all design variables as factors
# and with visc as the only response variable.
# Classical univariate Type II test results are produced.
ffmanova(visc ~ (factor(press) + factor(stab) + factor(emul))^2 + day,
data = dressing)
# A second order response surface model with day as a block factor.
# The properties of the extended Type II approach is utilized.
ffmanova(visc ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
data = dressing)
# 5050 MANOVA results with the particlevolume curves as
# multivariate responses. The responses are not standardized.
ffmanova(pvol ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
stand = FALSE, data = dressing)
# 5050 MANOVA results with 9 rheological responses (standardized).
# 99 rotation simulation repetitions are performed.
res < ffmanova(rheo ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
nSim = 99, data = dressing)
res$pRaw # Unadjusted single responses pvalues
res$pAdjusted # Familywise error rate adjusted pvalues
res$pAdjFDR # False discovery rate adjusted pvalues
# As above, but this time 9999 rotation simulation repetitions
# are performed, but only for the model term stab^2.
res < ffmanova(rheo ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
nSim = c(0,0,0,0,0,9999,0,0,0,0,0), data = dressing)
res$pAdjusted[6,] # Familywise error rate adjusted pvalues for stab^2
res$pAdjFDR[6,] # False discovery rate adjusted pvalues for stab^2
# Note that the results of the first example above can also be
# obtained by using the car package.
## Not run:
require(car)
Anova(lm(visc ~ (factor(press) + factor(stab) + factor(emul))^2 + day,
data = dressing), type = "II")
## End(Not run)
# The results of the second example differ because Anova does not recognise
# linear terms (emul) as being contained in quadratic terms (I(emul^2)).
# A consequence here is that the clear significance of emul disappears.
## Not run:
require(car)
Anova(lm(visc ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
data = dressing), type="II")
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.