Bonjour,
Est-ce que quelqu'un sait comment sont calculés les residus "working" dans un modèle linéaire (en particulier poissonien) ?
Merci
Maxime
Modérateur : Groupe des modérateurs
residuals: the working residuals, that is the residuals in the final iteration of the IWLS fit. Since cases with zero weights are omitted, their working residuals are NA.
Code : Tout sélectionner
> library(aod) ## package dispo sur le CRAN
Package aod, version 1.1-13
> data(dja)
> m1 <- glm(y ~ group + offset(log(trisk)), family = poisson, data = dja)
> head(m1$residuals) ## working residuals
1 2 3 4 5 6
-1.00000000 -0.05186084 -0.43385570 0.37030095 0.22275682 0.69946457
> head(residuals(m1, type = "response"))
1 2 3 4 5 6
-5.7418303 -0.2734875 -0.7663341 0.5404666 0.3643518 0.8231588
> head(residuals(m1, type = "working"))
1 2 3 4 5 6
-1.00000000 -0.05186084 -0.43385570 0.37030095 0.22275682 0.69946457
> head(m1$weights * m1$residuals)
1 2 3 4 5 6
-5.7419671 -0.2734876 -0.7663345 0.5404669 0.3643520 0.8231784
Retourner vers « Archives : Fonctions statistiques »
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 1 invité