When running the hmsc() function with familly="gaussian"
data("bryophytes")
bryophytes <- as.HMSCdata(Y=bryophytes$Y, X = bryophytes$X, Tr = bryophytes$Tr, scaleX = TRUE, scaleTr = FALSE, interceptX = FALSE, interceptTr = FALSE)
model<-hmsc(bryophytes,family="gaussian",niter=10000,nburn=1000,thin=10)
I get the following error:
error: matrix multiplication: incompatible matrix dimensions: 5x5 and 60x1 Error in mcmcNormalXTr(Ylatent, X, Tr, param$param$paramX, param$param$paramTr, : matrix multiplication: incompatible matrix dimensions: 5x5 and 60x1
However, if I remove the trait matrix, it works
bryophytes <- as.HMSCdata(Y=bryophytes$Y, X = bryophytes$X, scaleX = TRUE, scaleTr = FALSE, interceptX = FALSE, interceptTr = FALSE)
When running the hmsc() function with familly="gaussian"
data("bryophytes")bryophytes <- as.HMSCdata(Y=bryophytes$Y, X = bryophytes$X, Tr = bryophytes$Tr, scaleX = TRUE, scaleTr = FALSE, interceptX = FALSE, interceptTr = FALSE)model<-hmsc(bryophytes,family="gaussian",niter=10000,nburn=1000,thin=10)I get the following error:
error: matrix multiplication: incompatible matrix dimensions: 5x5 and 60x1 Error in mcmcNormalXTr(Ylatent, X, Tr, param$param$paramX, param$param$paramTr, : matrix multiplication: incompatible matrix dimensions: 5x5 and 60x1However, if I remove the trait matrix, it works
bryophytes <- as.HMSCdata(Y=bryophytes$Y, X = bryophytes$X, scaleX = TRUE, scaleTr = FALSE, interceptX = FALSE, interceptTr = FALSE)