# NOT RUN {
odata <- data.frame(y1 = rotpospois(n = 1000, lambda = loglink(1, inverse = TRUE)))
ofit <- vglm(y1 ~ 1, otpospoisson, data = odata, trace = TRUE, crit = "c")
coef(ofit, matrix = TRUE)
Coef(ofit)
# }
# NOT RUN {
with(odata,
hist(y1, prob = TRUE, breaks = seq(0.5, max(y1) + 0.5, by = 1),
border = "blue"))
x <- seq(1, with(odata, max(y1)), by = 1)
with(odata, lines(x, dotpospois(x, Coef(ofit)[1]), col = "orange", type = "h", lwd = 2))
# }
Run the code above in your browser using DataLab