guiblanchet / HMSC

Hierarchical modelling of species community
40 stars 13 forks source link

Error rWishart(1, paramX + 1, diag(nparamX)) in hmsc() #28

Open torresagostina opened 5 years ago

torresagostina commented 5 years ago

Dear all,

I am writing to you because when fitting hmsc to my data I get the following error:

"Error in rWishart(1, paramX + 1, diag(nparamX)) : inconsistent degrees of freedom and dimension"

I guess it is related to the prior of the sigma matrix of the multivariate normal of thetas. I have checked the dimensions of my matrices and there does not seem to be any problem.

My data consists of a Ymatrix of community cover data, my X matrix has three dummy variables (1/0), and my trait matrix has dummy variables as well.

I ran a model with matrices Y and X, and it worked. However, when I included the Tr matrix, the model returned the above-mentioned error. I have tried different strategies like, reducing the number of traits and including a phylogenetic matrix. However, the error continued.

I would be very thankful for any help,

Sincerely, Agostina Torres CONICET-Argentina