r - Poisson regression line -


How do I add a ghostly reception line to a plot? I tried the following, but nowline function is not working. The reason for this is that abline () uses intercept and slope, while a Poison regression line uses the log-link

  x = rpois (12, 5) plot (x, Axis = f) axis (1, at = 1: length (month.name), label = month.name) axis (side = 2) y = c (1:12) poislm = glm (x ~ y, family = poeson  

Code> predProbs & lt; -predict (poislm, data.frame (y = seq (minimum (y), max (y), length.out = 100), type = "response" lines (sek (min (y), max (y) Length.out = 100), predprobs, col = 2, lwd = 2)

Comments