-1
nb <- glm.nb(N_caouanne_mois ~ Golfe:cos(PseudoFourrier) + Golfe:sin(PseudoFourrier) + Effort_jours_mois.Rescaled + Longueur.des.bras.Rescaled + Longueur.du.bourrelet.Rescaled + Longueur.de.la.corde.de.dos.Rescaled + Taille.de.maille.cul.du.sac.Rescaled + Ouverture.verticale.Rescaled + Longueur.panneau..m.Rescaled + Duree.du.trait.Rescaled + Longueur.de.la.corde.de.dos.Rescaled + Golfe,
             ,na.action = "na.omit", data = NewChalutUnfold)
autoplot(nb)

Erreur : Objects of type negbin/glm/lm not supported by autoplot. Run rlang::last_error() to see where the error occurred.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
  • 1
    Welcome to stackoverflow! Please read [this](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and update your question. – ismirsehregal Sep 08 '20 at 13:25
  • did you *load* `ggfortify` as well as installing it? (You should probably add your "PS" to the body of your question rather than the title ...) – Ben Bolker Sep 08 '20 at 14:02

1 Answers1

2

Try

  • installing the ggfortify package (via install.packages("ggfortify")) [you only need to do this once per computer/installation of R] and
  • loading it (via library("ggfortify"))

then retry your autoplot() command.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
  • You are correct, I tried an example after posting my (incorrect) answer and deleted mine once I realized you were right. – jjack Sep 08 '20 at 14:07