zero inflated gaussian mixture model

356 views Asked by At

Are there any extensions to mclust, or another R package, which can model zero inflated continuous data? Mclust can't handle the inflated 0s, see code below.

library(tidyverse)
library(mclust)

n <- 250
y0 <- rep(0,n)
y1 <- rnorm(n/2,4,0.5)
y2 <- rnorm(n/2,5,2)
y3 <- rnorm(n/2,12,1)
y4 <- rnorm(n/2,10,2)
y <- c(y0,y1,y2,y3,y4)
hist(y)

#including zeros
mc <- densityMclust(data=y)
summary(mc)
plot(mc, what = "BIC")

#excluding zeros
y2 <- c(y1,y2,y3,y4)
mc <- densityMclust(data=y2)
summary(mc)
plot(mc, what = "BIC")
0

There are 0 answers