Loglik: Title: Likelihood function for Dirichlet and Multinomial...

View source: R/02_likelihood.R

LoglikR Documentation

Title: Likelihood function for Dirichlet and Multinomial models

Description

Title: Likelihood function for Dirichlet and Multinomial models

Usage

Loglik(Y, X, b, model)

Arguments

Y

matrix of count outcomes

X

matrix of covariates

b

matrix of dimensions p x q; where p = number of covariates & q = number of branches. Note: When q=1, we are conditioning the likelihood on that specific branch

model

character type of model to use for the Log Likelihood. Options are (Dirichlet Multinomial = "dirmult", Multinomial = "mult", or Dirichlet = "dir")

Details

This is adapted from Tao Wang and Hongyu Zhao (2017) This function is used to extract the log likelihood from Dirichlet & Multinomial models The log-likelihood value of a regression model is a way to measure the goodness of fit for a model.

Value

The value of the Log-likelihood for the desired model.


Goodgolden/LDTM documentation built on May 25, 2022, 5:25 p.m.