| logLik.multinom_TS_fit {LDATS} | R Documentation |
Log likelihood of a multinomial TS model
Description
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.
Usage
## S3 method for class 'multinom_TS_fit'
logLik(object, ...)
Arguments
object |
A |
... |
Not used, simply included to maintain method compatibility. |
Value
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).
Examples
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)
[Package LDATS version 0.3.0 Index]