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: 'glm', 'lm', 'nls' in package
     'nls' and 'gls', 'lme' and others in package 'nlme'.

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

     logLik(object, ...)

     ## S3 method for class 'logLik':
     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")' (*d*egrees of *f*reedom) 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.glm', '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))

