ffmanova          package:ffmanova          R Documentation(latin1)

_F_i_f_t_y-_f_i_f_t_y _M_A_N_O_V_A

_D_e_s_c_r_i_p_t_i_o_n:

     General linear modeling of fixed-effects models with multiple
     responses is performed. The function calculates 50-50 MANOVA
     p-values, ordinary univariate p-values and adjusted p-values using
     rotation testing.

_U_s_a_g_e:

     ffmanova(formula, data, stand = TRUE, nSim = 0, verbose = TRUE)

_A_r_g_u_m_e_n_t_s:

 formula: Model formula.  See Details.

    data: Data frame with model data.

   stand: Logical. Standardization of responses. This option has effect
          on the 50-50 MANOVA testing and the calculation of 'exVarSS'.

    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 'TRUE', the rotation tests print trace
          information.

_D_e_t_a_i_l_s:

     The model is specified with 'formula', in the same way as in 'lm'
     (except that offsets are not supported).  See 'lm' for details.

     An overall p-value for all responses is calculated for each model
     term. This is done using the 50-50 MANOVA method, which is a
     modified variant of classical MANOVA made to handle several highly
     correlated responses. 

     Ordinary single response p-values 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: 

        1.  Invariant to ordering of the model terms. 

        2.  Invariant to scale changes. 

        3.  Invariant to how the overparameterization problem of
           categorical variable models is solved (how constraints are
           defined).

        4.  Whether two-level factors are defined to be continuos or
           categorical  does not influence the results. 

        5.  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.

_V_a_l_u_e:

     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 'nPC' components

 exVarBU: variance explained by '(nPC+nBU)' components

 pValues: 50-50 MANOVA p-values

   stand: logical.  Whether the responses are standardised.

    stat: The test statistics as t-statistics (when single degree of
          freedom) or F-statistics 

    pRaw: matrix of ordinary p-values from F- or t-testing

pAdjusted: matrix of adjusted p-values according to familywise error
          rates

 pAdjFDR: matrix of adjusted p-values 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.

_A_u_t_h_o_r(_s):

     yvind Langsrud and Bjrn-Helge Mevik

_R_e_f_e_r_e_n_c_e_s:

     Langsrud, . (2002)  50-50 Multivariate Analysis of Variance for
     Collinear Responses. _The Statistician_, *51*, 305-317. 

     Langsrud, . (2003)  ANOVA for Unbalanced Data: Use Type II
     Instead of Type III Sums of Squares. _Statistics and Computing_,
     *13*, 163-167. 

     Langsrud, . (2005)  Rotation Tests. _Statistics and Computing_,
     *15*, 53-60. 

     Moen, B., Oust, A., Langsrud, ., 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*, 2086-2094.

     See also <URL: http://www.matforsk.no/ola/>.

_S_e_e _A_l_s_o:

     'manova5050', 'rotationtests' and 'unitests'; the work horse
     functions.

_E_x_a_m_p_l_e_s:

     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)

     # 50-50 MANOVA results with the particle-volume 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)

     # 50-50 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 p-values 
     res$pAdjusted #  Familywise error rate adjusted p-values 
     res$pAdjFDR   #  False discovery rate adjusted p-values

     # 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 p-values for stab^2
     res$pAdjFDR[6,]   # False discovery rate adjusted p-values for stab^2

     # Note that the results of the first example above can also be 
     # obtained by using the car package.
     ## Not run: 
     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: 
     Anova(lm(visc ~ (press + stab + emul)^2 + I(press^2)+ I(stab^2)+ I(emul^2)+ day,
           data = dressing), type="II")
     ## End(Not run)

