pseudo_values: Pseudo values - Expectation-Maximization (EM) algorithm

Description Usage Arguments Details Value Author(s) Examples

View source: R/pseudo_values.R

Description

The function returns the pseudo values t_i defined as the conditional expectation E[θ_i|k_1,...,k_n], where k_1,...,k_n are realizations of the count variable N.

Usage

1
pseudo_values(variable, mixing, lambda, gamma.par, nu, delta, n)

Arguments

variable

the vector of numbers

mixing

the name of mixing distribution – "Gamma", "lognorm", "invGauss"

lambda

λ parameter in mixed Poisson model

gamma.par

γ parameter in Gamma mixing distribution

nu

ν parameter in log-normal mixing distribution

delta

δ parameter in inverse-Gaussian mixing distribution

n

The integer value for the Laguerre quadrature. Default to 100

Details

The function calculates the vector of pseudo values t_i=E[θ_i|k_1,...,k_n] in E-step of EM algorithm. It applies the numerical integration using laguerre.quadrature in the nominator and the denominator of the formula

The proper parameter γ, ν, δ should be chosen according to the mixing distribution.

Value

pseudo_values

pseudo values t_1,...,t_n

nominator

nominator in the formula

denominator

denominator in the formula

Author(s)

Alicja Wolny–Dominiak, Michal Trzesiok

Examples

1
2
variable=rpois(30,4)
pseudo_values(variable, mixing="Gamma", lambda=4, gamma.par=0.7, n=100)

MixedPoisson documentation built on May 2, 2019, 12:40 p.m.