Fits Poisson or negative-binomial regression conditional on a strictly positive response. The linear predictor describes the mean of the underlying untruncated distribution; response predictions describe the conditional mean among positive observations.

fastglm_truncated(
  x,
  y = NULL,
  data = NULL,
  dist = c("poisson", "negbin"),
  weights = NULL,
  offset = NULL,
  theta = NULL,
  start = NULL,
  tol = 1e-08,
  maxit = 100L,
  outer.tol = 1e-08,
  outer.maxit = 100L
)

Arguments

x

numeric model matrix or model formula.

y

positive integer response for a matrix design.

data

data frame for a formula.

dist

`"poisson"` or `"negbin"`.

weights, offset

prior weights and offsets.

theta

fixed positive negative-binomial size; `NULL` estimates it.

start

initial regression coefficients.

tol, maxit

coefficient convergence controls.

outer.tol, outer.maxit

joint coefficient–theta convergence controls.

Value

A `fastglm_truncated` model with joint covariance when theta is estimated.