[R] log likelihood

Ben Bolker bolker at ufl.edu
Mon Nov 24 04:01:25 CET 2008


Joseph Magagnoli <jcm331 <at> gmail.com> writes:


> I ran a Weibull model, and I am wondering if  there is any way to extract
> the log likelihood.  I tried loglik(model)  but it does not seem to work
> any help would be greatly appreciated
> joe
> 

  You have to tell us what you mean by "ran a Weibull model",
there are (at least) several different contexts in R in which
you could have done this (distribution fitting, survival analysis ...)
what packages/functions did you use?  Can you show us a reproducible
example?

  logLik(model) [note capitalization] might work.
 str(model) or str(summary(model)) might show you
what's lurking inside the fitted model or its summary,
and allow you to extract the log-likelihood.

  Ben Bolker



More information about the R-help mailing list