This is an auxiliary function to fim_nb(). It calculates p(x_ij|y=k) for a single data point and store it in a vector for future use. It is mainly for speed up the calculation of fim_nb().
1 | p_ijk(dataPoint, pars, xIndices, xIndex, yValue)
|
dataPoint |
A single data point in the given data set. |
pars |
A list of MLE of NB parameters. |
xIndices |
A vector of input variables' indices. |
xIndex |
The idnex of a particular input variable in colnames(data). |
yValue |
The value of the output variable. The current version of mml_nb only takes binar variables, so the possible y values are 0, 1. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.