[R-sig-eco] K-fold validation for glmer model
basille.web at ase-research.org
basille.web at ase-research.org
Tue May 3 04:28:00 CEST 2016
Dear Samhita,
I wrote a function that does exactly this: kfold for LMER objects (e.g. in
the context of resource selection functions). It is in the 'kfold' branch
(in development) of my package 'hab' [1].
I have to admit it is largely untested, which is why it is not in the
official version... I think it should work though, you may want to give it
a try.
Mathieu.
[1] https://github.com/basille/hab/blob/kfold/R/kfold.r
Le 02/05/2016 21:58, Samhita Bose (SCIFAC-Biological Sciences) a écrit :
> Hi,
>
>
> I am trying to see resource selection in black tailed deer across seasons and activity state. I am fairly new to R and have used glmer function from lme4 to fit my data. I have used physical variables (elevation, aspect and ruggedness) and vegetation classes as fixed effect and individual deer as random effect in my model. Now I want to validate my model to test the robustness of my assumptions. I have tried using package caret but it is not supporting glmer model. Is there any R code to conduct a k fold cross validation of a glmer model? Any help will be appreciated.
>
>
> Thanks,
>
> Samhita
>
>
> Samhita Bose
> PhD Student
> School of Biological Sciences
> New Kirk Building, Kelburn Parade
> Victoria University of Wellington
> Work: +64-4-463-8554 Cell: +64-22-389-3800
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
--
Mathieu Basille
basille at ufl.edu | http://ase-research.org/basille
+1 954-577-6314 | University of Florida FLREC
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
— Paul Éluard
More information about the R-sig-ecology
mailing list