0
I have a data set, where the response variable of my study has many zeros; therefore, I decided to understand the influence of predictive variables using a "Hurdle model". Look at my code:
fórmula <- dados$Nº_de_artigos ~ dados$Status_Red_List + dados$Z_Capacidade_Científica +
dados$Z_Fossorial + dados$Z_Terrestre + dados$Z_Aquática + dados$Z_Arbórea +
dados$Z_Diurna + dados$Z_Noturna + dados$Z_Crepuscular +
dados$Z_Meses_Úmidos_e_Quentes + dados$Z_Meses_Úmidos_e_Frios +
dados$Z_Meses_Secos_e_Quentes + dados$Z_Meses_Secos_e_Frios +
dados$Z_Desenvolvimento_Direto + dados$Z_Desenvolvimento_Larval +
dados$Z_Vivípara + dados$Z_Tamanho_Corporal_mm +
dados$Z_Nº_de_Reproduções_por_Ano
#Onde "Status_Red _List" é uma variável categórica.
resultado <- hurdle(formula = fórmula, dist = "negbin", data = dados, na.action = "na.fail")
#Aí aparece:
Error in optim(fn = countDist, gr = countGrad, par = c(start$count, if (dist == : Non-finite value supplied with optim
Does anyone know how to solve this? I have searched several websites, but I have not found a suitable solution :(
It is very difficult (perhaps impossible) to give you a definitive answer without working with the same data that you are using. However, it is possible to raise some hypotheses. 1) I counted 18 predictive variables in your model. Is it necessary to have such a complex model? Would it be possible to exclude some variables using common sense? 2) What is the sample size? If it is small, it is possible that your model does not suit.
– Marcus Nunes
– Marcus Nunes