logLik.TS_fit: Determine the log likelihood of a Time Series model

View source: R/TS.R

logLik.TS_fitR Documentation

Determine the log likelihood of a Time Series model

Description

Convenience function to extract and format the log likelihood of a TS_fit-class object fit by multinom_TS.

Usage

## S3 method for class 'TS_fit'
logLik(object, ...)

Arguments

object

Class TS_fit object to be evaluated.

...

Not used, simply included to maintain method compatibility.

Value

Log likelihood of the model logLik, also with df (degrees of freedom) and nobs (number of observations) values.

Examples


  data(rodents)
  document_term_table <- rodents$document_term_table
  document_covariate_table <- rodents$document_covariate_table
  LDA_models <- LDA_set(document_term_table, topics = 2)[[1]]
  data <- document_covariate_table
  data$gamma <- LDA_models@gamma
  weights <- document_weights(document_term_table)
  TSmod <- TS(data, gamma ~ 1, nchangepoints = 1, "newmoon", weights)
  logLik(TSmod)



LDATS documentation built on Sept. 19, 2023, 5:08 p.m.