Dear list,I am fitting a fourth corner model using the mvabund package. I would like to obtain the percentage of deviance explained by my model. However the function traitglm of the mvabund package does not give any measure of goodness of fit. A paper published in Methods in Ecology and Evolution, Brown et al. 2014 "The fourth-corner solution � using predictive modelsto understand how species traits interact with the environment" describes a solution to obtain the percentage of explained deviance (a kind of R2) from the fourth corner model, by using the predictive deviance and the cross-validation. The method consists of: 1)splitting the dataset in training and test (i.e., 70-30%) 2) Calculating the deviance of the training model 3)Predicting the model on the test dataset by using as predictive type the log-likelihoods [predict(object, newR=NULL, newQ=NULL, newL=NULL, type="LogL", ...)] 4) Computing the % of deviance explained.
In particular, I am not able to perform the fourth step. Do you have any suggestion?