Hi everyone,
First, thank you for all the questions and answers shared in this group; they have been incredibly helpful in resolving many of my past issues.
I'm now encountering a persistent error while trying to fit a spatial, multispecies occupancy model. The model fails consistently with the error:
c++ error: dpotrf A.alpha failed
This error occurs after the first MCMC chain finishes successfully. Subsequent chains fail immediately.
Model Details:
Data: 256 sampling sites, 2 replicates, 130 bird species.
Covariates: I have four covariates, two of which I'm including as quadratic terms (total of six predictors):
Two bamboo species proportions (range 0–1, means ~0.11 and 0.19). These are the ones I need to be as quadratic terms.
Altitude (range 73–627, mean 325).
Forest area (range 8–325, mean 249).
Scaling Issue: The problem is directly related to covariate scaling.
The model runs perfectly if I use scale(variable, scale = FALSE) for the bamboo variables and full scale() for the others.
The model consistently fails if I use the default scale(variable) or scale(variable, scale = FALSE) for all variables, including the bamboo proportions.
Troubleshooting Attempts:
Adjusted all priors as suggested (particularly, phi.unif = list(3/(max.maxdist/2), 1/(max.mindist)) bounds from resources like the Doser Lab website).
Verified no duplicate coordinates exist (models with scale(bamboos, scale = FALSE) runs ok, and then only changing the scaling runs to the same error).
Increased MCMC settings substantially (n.batch = 10,000, batch.length = 25, n.thin = 50), but the error persists.
As I understand and looked up, the issue seems to be that full standardization (dividing by the standard deviation) of the bamboo proportion variables creates a numerically unstable covariance matrix. Since these are already on a defined 0–1 scale, they may not need the same scaling as continuous variables like altitude.
I definitly run out of options, any ideas of what to do next?
Thank you for your time and expertise.
--
You received this message because you are subscribed to the Google Groups "spOccupancy and spAbundance users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spocc-spabund-u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/spocc-spabund-users/f0b1d572-8873-48c2-8f9b-44c37b4b9fadn%40googlegroups.com.