coef.lme                package:nlme                R Documentation

_E_x_t_r_a_c_t _l_m_e _C_o_e_f_f_i_c_i_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     The estimated coefficients at level i are obtained by adding
     together the fixed effects estimates and the corresponding random
     effects estimates at grouping levels less or equal to i. The
     resulting estimates are returned as a data frame, with rows
     corresponding to groups and columns to coefficients. Optionally,
     the returned data frame may be augmented with covariates
     summarized over groups.

_U_s_a_g_e:

     ## S3 method for class 'lme':
     coef(object, augFrame, level, data, which, FUN, 
            omitGroupingFactor, subset, ...)

_A_r_g_u_m_e_n_t_s:

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

augFrame: an optional logical value. If 'TRUE', the returned data frame
          is augmented with variables defined in 'data'; else, if
          'FALSE', only the coefficients are returned. Defaults to
          'FALSE'.

   level: an optional positive integer giving the level of grouping to
          be used in extracting the coefficients from an object with
          multiple nested grouping levels. Defaults to the highest or
          innermost level of grouping.

    data: an optional data frame with the variables to be used for
          augmenting the returned data frame when 'augFrame = TRUE'.
          Defaults to the data frame used to fit 'object'.

   which: an optional positive integer or character vector specifying
          which columns of 'data' should be used in the augmentation of
          the returned data frame. Defaults to all columns in 'data'.

     FUN: an optional summary function or a list of summary functions
          to be applied to group-varying variables, when collapsing
          'data' by groups.  Group-invariant variables are always
          summarized by the unique value that they assume within that
          group. If 'FUN' is a single function it will be applied to
          each non-invariant variable by group to produce the summary
          for that variable.  If 'FUN' is a list of functions, the
          names in the list should designate classes of variables in
          the frame such as 'ordered', 'factor', or 'numeric'.  The
          indicated function will be applied to any group-varying
          variables of that class.  The default functions to be used
          are 'mean' for numeric factors, and 'Mode' for both 'factor'
          and 'ordered'.  The 'Mode' function, defined internally in
          'gsummary', returns the modal or most popular value of the
          variable.  It is different from the 'mode' function that
          returns the S-language mode of the variable.

omitGroupingFactor: an optional logical value.  When 'TRUE' the
          grouping factor itself will be omitted from the group-wise
          summary of 'data' but the levels of the grouping factor will
          continue to be used as the row names for the returned data
          frame. Defaults to 'FALSE'.

  subset: an optional expression specifying a subset

     ...: some methods for this generic require additional arguments. 
          None are used in this method.

_V_a_l_u_e:

     a data frame inheriting from class 'coef.lme' with the estimated
     coefficients at level 'level' and, optionally, other covariates
     summarized over groups. The returned object also inherits from
     classes 'ranef.lme' and 'data.frame'.

_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:

     'lme',  'ranef.lme', 'plot.ranef.lme', 'gsummary'

_E_x_a_m_p_l_e_s:

     fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject)
     coef(fm1)
     coef(fm1, augFrame = TRUE)

