I've been trying to run a CAR model (CARBayes package - S.CARbym function in R) to predict the risk of visceral leishmaniasis diseases in Sao Paulo state, Brazil. The covariates are precipitation, altitude, temperature, and distance of highways. When I run the model with all raw covariates there is an error: "Error in ar.yw.default(x, aic = aic, order.max = order.max, na.action = na.action, : zero-variance series"

I tried to adjust the covariates values with similar ranges based on

(observed data - mean)/(standard deviation of observed data)

equation=LV~offset(log(Total_Pop))+precipitation+altitude+temperature+distance model <- S.CARbym(formula=equation, family="zip", formula.omega=~1, data=spat.data, W=W2, burnin=100000, n.sample=300000, thin=20)

Then I could run the model but the DIC values results = NaN.

My data (Y) has a lot of "zeros" so the zip family seems to be the most suitable. The total of data is 643 features. I used population as the offset.

Individually, for each covariate, it works. But I'd like to run the model with all of them.

How can I fix this?

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.