From the course: Machine Learning with Logistic Regression in Excel, R, and Power BI

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Calculating multinomial log likelihoods

Calculating multinomial log likelihoods

- To calculate the log likelihood of multinomial regression, we're going to use a formula, similar to what we saw with binomial logistic regression, except the log likelihood formula, will have a few more terms. In Excel, one function that will really help us out in these calculations is SUMPRODUCT. If we take the units and the unit cost for four different kinds of fruits apples, bananas, pears, and oranges. We can calculate the total cost by multiplying, the units and the unit costs together for each row, and then adding them together to get the final result. The SUMPRODUCT function lets us skip to the total cost in fewer steps without having to write them out in the same way that we did for each product. For our formula we're going to take two and put a raise, although we could take more. We'll take the units array, and the second array is the unit price. Because these arrays are the same size, we would multiply each one…

Contents