Description Usage Arguments Value
View source: R/multinomial_likelihood.R
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.
1 | multinomial_log_likelihood(y, X, b_vector)
|
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 |
the value of the mulitnomial regression log-likelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.