lambda_m_step {MixedPoisson}R Documentation

Estimation of Lambda in M-step – Expectation-Maximization (EM) algorithm

Description

The function fits the GLM Poisson with given offset.

Usage

lambda_m_step(variable, X, offset)

Arguments

variable

the vector of numbers

X

model matrix of the form X=model.matrix(~regressor). In the model without regressor the X sould be defined as X=as.matrix(rep(1, length(variable)))

offset

offset in GLM Poisson

Details

It fits the GLM Poisson, where variable \sim 1 and the ofsset is given as the vector of the variable's length. The results are used in M-step of EM algorithm, cf. [Karlis, 2012] pp. 6850.

Value

lambda

\hat \lambda=\hat \beta X

beta

regressor parameters

glm

output of \texttt{glm}

Author(s)

Alicja Wolny–Dominiak, Michal Trzesiok

Examples

set.seed(1234)
variable=rpois(50,4)
X=as.matrix(rep(1, length(variable)))
t=pseudo_values(variable, mixing=c("invGauss"), lambda=4, delta=1, n=100)
lambda_m_step(variable, X, offset=t$pseudo_values)

[Package MixedPoisson version 2.0 Index]