HZINB_independence: HGZIPS - HZINB (assuming independence)

Description Usage Arguments Value

View source: R/HZINB_independence.R

Description

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.

Usage

 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
)

Arguments

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

Value

HZINB_independence a list of estimated probability of each alpha, beta, omega combination and their corresponding loglikelihood (optional)


sidiwang/hgzips documentation built on Jan. 19, 2021, 4:09 p.m.