Learn R Programming

lame (version 1.3.4)

rZ_pois_fc: Gibbs update for latent variable in a Poisson AME model

Description

Updates the latent variable Z in a Poisson AME model using a Metropolis-Hastings step. The model assumes y_{i,j} ~ Poisson(exp(z_{i,j})) where z_{i,j} is the latent variable representing the log mean.

Usage

rZ_pois_fc(Z, EZ, rho, s2, Y)

Value

updated value of Z

Arguments

Z

a square matrix, the current value of the latent variable

EZ

expected value of Z (regression effects + random effects)

rho

dyadic correlation

s2

dyadic variance (overdispersion parameter)

Y

square relational matrix of observed counts

Author

Cassy Dorff, Shahryar Minhas, Tosin Salau