0

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")
Zeus
  • 1,496
  • 2
  • 24
  • 53
  • maybe this helps? https://stats.stackexchange.com/questions/187824 `pscl` has good functions for count data, https://stats.idre.ucla.edu/r/dae/zip/ – brian avery Jan 28 '21 at 00:01
  • thanks, but the data is continuous (beside the 0s), not count, so I can't use a neg binomial or poisson distribution – Zeus Jan 28 '21 at 00:09
  • Take a look into the [`VGAM`](https://cran.r-project.org/web/packages/VGAM/index.html) package. – jay.sf Jan 28 '21 at 05:19
  • thanks, VGAM looks like it might help – Zeus Jan 30 '21 at 08:54

0 Answers0