logLik                 package:base                 R Documentation

_E_x_t_r_a_c_t _L_o_g-_L_i_k_e_l_i_h_o_o_d

_D_e_s_c_r_i_p_t_i_o_n:

     This function is generic; method functions can be written to
     handle specific classes of objects.  Classes which already have
     methods for this function include: `lm', `nls' in package nls, and
     `gls', `lme' and others in package nlme.

_U_s_a_g_e:

     logLik(object, ...)

     as.data.frame(x, row.names = NULL, optional = FALSE)

_A_r_g_u_m_e_n_t_s:

  object: any object from which a log-likelihood value, or a
          contribution to a log-likelihood value, can be extracted.

     ...: some methods for this generic function require additional
          arguments.

       x: an object of class `logLik'.

row.names, optional: arguments to the `as.data.frame' method; see its
          documentation.

_V_a_l_u_e:

     Returns an object, say `r', of class `logLik' which is a number
     with attributes, `attr(r, "df")' (degrees of freedom) giving the
     number of parameters in the model. There's a simple `print' method
     for `logLik' objects.

     The details depend on the method function used; see the
     appropriate documentation.

_A_u_t_h_o_r(_s):

     Jose Pinheiro and Douglas Bates

_S_e_e _A_l_s_o:

     `logLik.lm', `logLik.nls', `logLik.gls', `logLik.lme', etc.

_E_x_a_m_p_l_e_s:

     ## see the method function documentation
     x <- 1:5
     lmx <- lm(x ~ 1)
     logLik(lmx) # using print.logLik() method
     str(logLik(lmx))

