Solve Gaussian approximation to Poisson mean problem
Source:R/EB_poisson_mean_routines.R
ebpm_normal.Rd
Gaussian prior, Gaussian posterior in Poisson mean problem.
Usage
ebpm_normal(
x,
s = NULL,
g_init = NULL,
fix_g = FALSE,
q_init = NULL,
maxiter = 20,
tol = 1e-05,
vga_tol = 1e-05,
conv_type = "sigma2abs",
return_sigma2_trace = FALSE
)
Arguments
- x
data vector
- s
scaling vector
- g_init
a list of mean, and var. Can be NULL for both parameters.
- fix_g
Whether fix g at g_init. If only fix either mean, or var, fix_g can be a length 2 boolean vector.
- q_init
a list of init value of m_init(posterior mean) and v_init(posterior var).
- maxiter
max number of iterations
- tol
tolerance for stopping the updates
- conv_type
convergence criteria, default to be elbo
- return_sigma2_trace
whether return the trace of sigma2 estiamtes