otpospoisson: One-truncated Poisson Distribution

View source: R/family.vd1.R

otpospoissonR Documentation

One-truncated Poisson Distribution


Estimating the (single) parameter of the 1-truncated positive Poisson distribution.


 otpospoisson(llambda = "loglink",
    type.fitted = c("mean", "lambda", "prob0", "prob1"),
    ilambda = NULL, imethod = 1, zero = NULL)


llambda, type.fitted, ilambda

Same as pospoisson.

imethod, zero

Same as pospoisson. See CommonVGAMffArguments for information.


The 1-truncated positive Poisson distribution has support on 2, 3, .... It is a Poisson distribution but with the probability of a one or zero being 0. The other probabilities are scaled to add to unity. Some more details can be found at pospoisson. Multiple responses are permitted.


An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.


T. W. Yee

See Also

Otpospois, oipospoisson, simulate.vlm.


## Not run: 
odata <- data.frame(y1 = rotpospois(1000, lambda = loglink(1, inv = TRUE)))
ofit <- vglm(y1 ~ 1, otpospoisson, data = odata, trace = TRUE, crit = "c")
coef(ofit, matrix = TRUE)
    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)) 
## End(Not run)

VGAMdata documentation built on Sept. 18, 2023, 9:08 a.m.