multinomial_log_likelihood: Computes the log likelihood for multinomial regression

Description Usage Arguments Value

View source: R/multinomial_likelihood.R

Description

Given a matrix of responses, a design matrix, and a vector of beta coefficients (must be a vector to be compatible with optim), it will return the value of the log likelihood for multinomial regression.

Usage

1

Arguments

y

an (n x (k-1)) matrix for the dependent variable as created by the data_to_multinomial function, where k is the number of categories for y.

X

an (n x p) matrix where p is the number of predictors

b_vector

a (p*(k-1)) vector

Value

the value of the mulitnomial regression log-likelihood


group-wine/sommelieR documentation built on May 21, 2019, 1:43 p.m.