Learn R Programming

VLMCX (version 1.0)

LogLik: Log Likelihood for Variable Length Markov Chains with Exopgenous Covariates

Description

Computes the log-likelihood of the data using the estimated parameters of the multinomial logistic regression based on contexts of variable length, that is, a finite suffix of the past, called "context", is used to predict the next symbol, which can have different lengths depending on the past observations themselves.

Usage

LogLik(fit)

Value

a numeric value with the corresponding log-likelihood

Arguments

fit

a VLMCX object.

Author

Adriano Zanin Zambom <adriano.zambom@csun.edu>

Examples

Run this code


# \donttest{
n = 1000
d = 2

X = cbind(rnorm(n), rnorm(n))

y = rbinom(n,1,.5)
fit = maximum.context(y, X)

LogLik(fit)
# }

Run the code above in your browser using DataLab