I am running a code for hurdle models. I have five independent variables and five dependent variables (used one at a time). The challenge is some of my dependent variables are giving errors. This is the code and the attached error message. I tried log transformation but it didn't work. . I would be happy if anyone could help here.
#########################
library(pscl)
library(readxl)
Cdata4 <- read_excel("C:/Users/8th gen L480/OneDrive/Desktop/Et's Data/CS_dataset.xlsx",
sheet = "Spider")
View(Cdata4)
names(Cdata4)
fm_hnb1 <- hurdle(Cdata4$Lacewing ~ ., data = Cdata4 , dist = "negbin")
summary(fm_hnb1)
This is the error message:
fm_hnb1 <- hurdle(Cdata4$Lacewing ~ ., data = Cdata4 , dist = "negbin")
Error in model.matrix.default(mtZ, mf) :
model frame and formula mismatch in model.matrix()
summary(fm_hnb1)
Error in summary(fm_hnb1) : object 'fm_hnb1' not found