1

I'm trying to build Conway Maxwell Poisson model with glmmTMB package with model's family = "compois". The model works okay but I cannot find any output from the model that expresses the Conway-Maxwell's Lambda and Nu parameters which hinders me to run Conway-Maxwell random number generator for simulation

Some simple codes to illustrate this

install.packages("COMPoissonReg")
install.packages("glmmTMB")
library(COMPoissonReg)
library(glmmTMB)

#Create artificial COM poisson count data as response variable
data <- data.frame(Response = rcmp(5000, lambda = 3, nu = 2))
#Create artificial poisson count data as explanatory variable
data$Covariate <- rpois(5000, lambda = 1)*data$Response

#Run ConwayMaxwellPois glmmTMB regression model
Mod <- glmmTMB(Response ~ Covariate, 
               family = "compois",
               data = data)
summary(Mod)

#Check Models structure
str(Mod)

#Predict mu
predict(Mod, type = "response")
#Predict dispersion parameters
predict(Mod, type = "disp")

The predict(Mod, type = "response") returns the actual mean which is not the lambda, and the predict(Mod, type = "disp") returns small decimal values which I think those are not the Nu (I've read from some sources that the actual Nu is 1/predict(Mod, type = "disp") but I'm not sure if this is actually true).

0 Answers0