Description Usage Arguments Value
View source: R/HZINB_independence.R
This HZINB_independence
function finds hyperparameter estimates by implementing the Expectation-Maximization (EM) algorithm and hierarchical zero-inflated negative binomial model with one gamma component.
1 2 3 4 5 6 7 8 9 10 11 12 13 | HZINB_independence(
grid_a,
grid_b,
grid_omega,
init_pi_k,
init_pi_l,
init_pi_h,
dataset,
iteration,
Loglik = FALSE,
zeroes = FALSE,
N_star = 1
)
|
grid_a |
alpha value grid |
grid_b |
beta value grid |
grid_omega |
omega value grid |
init_pi_k |
initial probability of each alpha value for implementing the EM algorithm |
init_pi_l |
inital probability of each beta value for implementing the EM algorithm |
init_pi_h |
initial probability of each omega value for implementing the EM algprithm |
dataset |
a list of squashed datasets that include N_ij, E_ij and weights for each drug (j). This dataset list can be generated by the rawProcessing function in this package. |
iteration |
number of EM algorithm iterations to run |
Loglik |
whether to return the loglikelihood of each iteration or not (TRUE or FALSE) |
zeroes |
A logical scalar specifying if zero counts should be included. |
N_star |
the minimum Nij count size to be used for hyperparameter estimation. If zeroes are included in Nij vector, please set N_star = NULL HZINB_independence |
HZINB_independence
a list of estimated probability of each alpha, beta, omega combination and their corresponding loglikelihood (optional)
theta_EM
Estimate of hyperparameters for each EM iteration
llh
logliklihood for each EM iteration (optional)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.