Wednesday 15 January 2014

numbers - Is it possible to extract only the log-likelihood value from logLik object in R? -


Basically I am trying to find a way to extract the number value of log-probability value from logLik object

e.g., Output: 'LogLick.' -72.078 9 (DF = 2) Is it possible to remove only '-72.0789' number, so that it can be assigned elsewhere?

Just use [ to extract values. Eg:

  logLik (mod) [1] # [1] -10.44608   

or head :

  head (LogLink) # [1] -10.44608    

No comments:

Post a Comment