R/logLik.selection.R

Defines functions logLik.selection

Documented in logLik.selection

logLik.selection <- function( object, ... ) {
   if( !inherits( object, "maxLik" ) ) {
      stop( "the logLik() method currently only works for models estimated",
         " by maximum likelihood (ML)",
         " but it does not work for models estimated by the 2-step method." )
   }
   result <- NextMethod( object )
   attr( result, "nobs" ) <- nObs( object )
   attr( result, "df" ) <- sum( activePar( object ) )
   class( result ) <- "logLik"
   return( result )
}

Try the sampleSelection package in your browser

Any scripts or data that you put into this service are public.

sampleSelection documentation built on Jan. 13, 2021, 7:49 p.m.