Convenience function to simply extract the logLik
element (and df
and nobs
) from a multinom_TS_fit
object fit by multinom_TS
. Extends
logLik
from multinom
to
multinom_TS_fit
objects.
# S3 method for multinom_TS_fit logLik(object, ...)
object | A |
---|---|
... | Not used, simply included to maintain method compatibility. |
Log likelihood of the model, as class logLik
, with
attributes df
(degrees of freedom) and nobs
(the number of
weighted observations, accounting for size differences among documents).
data(rodents) dtt <- rodents$document_term_table lda <- LDA_set(dtt, 2, 1, list(quiet = TRUE)) dct <- rodents$document_covariate_table dct$gamma <- lda[[1]]@gamma weights <- document_weights(dtt) mts <- multinom_TS(dct, formula = gamma ~ 1, changepoints = c(20,50), timename = "newmoon", weights = weights) logLik(mts)