anova.lme                package:nlme                R Documentation

_C_o_m_p_a_r_e _L_i_k_e_l_i_h_o_o_d_s _o_f _F_i_t_t_e_d _O_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     When only one fitted model object is present, a data frame with
     the sums of squares, numerator degrees of freedom, denominator
     degrees of freedom, F-values, and P-values for Wald tests for the
     terms in the model (when 'Terms' and 'L' are 'NULL'), a
     combination of model terms (when 'Terms' in not 'NULL'), or linear
     combinations of the model coefficients (when 'L' is not 'NULL').
     Otherwise, when multiple fitted objects are being compared, a data
     frame with the degrees of freedom, the (restricted)
     log-likelihood, the Akaike Information Criterion (AIC), and the
     Bayesian Information Criterion (BIC) of each object is returned.
     If 'test=TRUE', whenever two consecutive  objects have different
     number of degrees of freedom, a likelihood ratio statistic, with
     the associated p-value is included in the returned data frame.

_U_s_a_g_e:

     ## S3 method for class 'lme':
     anova(object, ..., test, type, adjustSigma, Terms, L, verbose)
     ## S3 method for class 'anova.lme':
     print(x, verbose, ...)

_A_r_g_u_m_e_n_t_s:

  object: a fitted model object inheriting from class 'lme',
          representing a mixed-effects model.

     ...: other optional fitted model objects inheriting from classes
          'gls', 'gnls', 'lm', 'lme', 'lmList', 'nlme', 'nlsList', or
          'nls'.

    test: an optional logical value controlling whether likelihood
          ratio tests should be used to compare the fitted models
          represented by 'object' and the objects in '...'. Defaults to
          'TRUE'.

    type: an optional character string specifying the type of sum of
          squares to be used in F-tests for the terms in the model. If 
          '"sequential"', the sequential sum of squares obtained by
          including the terms in the order they appear in the model is
          used; else, if '"marginal"', the marginal sum of squares
          obtained by deleting a term from the model at a time is used.
          This argument is only used when a single fitted object is
          passed to the function. Partial matching of arguments is
          used, so only the first character needs to be provided.
          Defaults to '"sequential"'.

adjustSigma: an optional logical value. If 'TRUE' and the estimation
          method used to obtain 'object' was maximum likelihood, the
          residual standard error is multiplied by sqrt(nobs/(nobs -
          npar)), converting it to a REML-like estimate. This argument
          is only used when a single fitted object is passed to the
          function. Default is 'TRUE'.

   Terms: an optional integer or character vector specifying which
          terms in the model should be jointly tested to be zero using
          a Wald F-test. If given as a character vector, its elements
          must correspond to term names; else, if given as an integer
          vector, its elements must correspond to the order in which
          terms are included in the model. This argument is only used
          when a single fitted object is passed to the function.
          Default is 'NULL'.

       L: an optional numeric vector or array specifying linear
          combinations of the coefficients in the model that should be
          tested to be zero. If given as an array, its rows define the
          linear combinations to be tested. If names are assigned to
          the vector elements (array columns), they must correspond to
          coefficients names and will be used to map the linear
          combination(s) to the coefficients; else, if no names are
          available, the vector elements (array columns) are assumed in
          the same order as the coefficients appear in the model. This
          argument is only used when a single fitted object is passed
          to the function. Default is 'NULL'.

       x: an object inheriting from class 'anova.lme'

 verbose: an optional logical value. If 'TRUE', the calling sequences
          for each fitted model object are printed with the rest of the
          output, being omitted if 'verbose = FALSE'. Defaults to
          'FALSE'.

_V_a_l_u_e:

     a data frame inheriting from class 'anova.lme'.

_N_o_t_e:

     Likelihood comparisons are not meaningful for objects fit using
     restricted maximum likelihood and with different fixed effects.

_A_u_t_h_o_r(_s):

     Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates
     bates@stat.wisc.edu

_S_e_e _A_l_s_o:

     'gls', 'gnls', 'nlme', 'lme', 'AIC', 'BIC', 'print.anova.lme'

_E_x_a_m_p_l_e_s:

     fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject)
     anova(fm1)
     fm2 <- update(fm1, random = pdDiag(~age))
     anova(fm1, fm2)

