Fonctions récursives (avec R)

Les fonctions récursives sont des fonctions qui s'appellent elle mêmes lors de leurs exécution voir: https://fr.wikipedia.org/wiki/Fonction_r%C3%A9cursive. Un des challenges posé par Cédric sur son site: http://cedric-pupka.com/?p=117 , nous mets au défi de crée une fonction factorielle qui est récursive. Voici une solution en R: #factoriel récursive f<-function(x){   tmp<-1   if(x>0){     tmp<-f(x-1)*x   } … Continue reading Fonctions récursives (avec R)

Checking (G)LM model assumptions in R

(Generalized) Linear models make some strong assumptions concerning the data structure: Independance of each data points Correct distribution of the residuals Correct specification of the variance structure Linear relationship between the response and the linear predictor For simple lm 2-4) means that the residuals should be normally distributed, the variance should be homogenous across the … Continue reading Checking (G)LM model assumptions in R

Interpreting interaction coefficient in R (Part1 lm) UPDATED

(going through this post again three years after I posted it. Made some, hopefully useful, changes) Interaction are the funny interesting part of ecology, the most fun during data analysis is when you try to understand and to derive explanations from the estimated coefficients of your model. However you do need to know what is … Continue reading Interpreting interaction coefficient in R (Part1 lm) UPDATED