[R-sig-eco] Rsquared from predictive deviance
Ludovico Frate
ludovicofrate at hotmail.it
Thu Jul 7 10:41:21 CEST 2016
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?
Thanks,Ludovico
Dott. For. Ludovico
Frate, Ph.D.
University of Molise - Italy
Environmetrics Lab
http://www.distat.unimol.it/STAT/environmetrica/organico/collaboratori/ludovico-frate-1
Department of Biosciences and Territory - DiBT
Università del Molise.
Contrada Fonte
Lappone,
86090 - Pesche (IS)
ITALIA.
Cel: ++39
3333767557
Fax: ++39 (0874) 404123
E-mail ludovico.frate at unimol.it
ludovicofrate at hotmail.it
https://www.researchgate.net/profile/Ludovico_Frate
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list