Dear Jeffrey
I am working with an MSc student here at UWE Bristol on a multi species msNMix model using SpAbundance. We are using basic Temperature and Precipitation variables on 16 species. For context we have 16 species, 155 sampling occasions and 1 site.
We have templated up your online example and it runs great. We then placed our data into the code with default criteria and it creates a nice model. However, we are having a dreadful time with some of the model fit commands and predict functions (see below) post model creation.
Do you recognise these error codes? Are we missing something?
Thanks for your time,
Todd Lewis
######################################################################
#Chi-squared GOF - group must be 0 (raw data), 1 (sites), or 2 (replicates)
> ppc.ms.out = ppcAbund(
out.ms, fit.stat= 'chi-squared', group = 0)
Error in apply(y[1, , ], 1, function(a) sum(!
is.na(a))) :
dim(X) must have a positive length
> waicAbund(
out.ms, by.species = F)
N.max not specified. Setting upper index of integration of N to 10 plus
the largest estimated abundance value at each site in object$N.samples
Currently on species 1 out of 16
Error in apply(y, 1, max, na.rm = TRUE) :
dim(X) must have a positive length
> out.pred <- predict(
out.ms, X.0, ignore.RE = T, type = 'abundance')
Error in t(as.matrix(X.fix[j, ])) %*% t(beta.samples[, sp.indx == i]) :
non-conformable arguments
#######################################################################