zageometric(lpobs0 = "logit", lprob = "logit", imethod = 1,
ipobs0 = NULL, iprob = NULL, zero = NULL)
pobs0
or phi
here.
See Links
for more choices.prob
or $p$.
See Links
for more choices."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
The fitted.values
slot of the fitted object,
which should be extracted by the generic function fitted
, returns
the mean $\mu$ which is given by
Inference obtained from summary.vglm
and summary.vgam
may or may not be correct. In particular, the p-values, standard errors
and degrees of freedom may need adjustment. Use simulation on artificial
data to check that these are reasonable.
The input can be a matrix. By default, the two linear/additive predictors are $(\log(\phi), logit(p))^T$.
dzageom
, geometric
,
zigeometric
,
dgeom
,
CommonVGAMffArguments
.zdata <- data.frame(x2 = runif(nn <- 1000))
zdata <- transform(zdata,
pobs0 = logit(-1 + 2*x2, inverse = TRUE),
prob = logit(-2 + 3*x2, inverse = TRUE))
zdata <- transform(zdata,
y1 = rzageom(nn, prob = prob, pobs0 = pobs0))
with(zdata, table(y1))
fit <- vglm(y1 ~ x2, zageometric, zdata, trace = TRUE)
coef(fit, matrix = TRUE)
head(fitted(fit))
head(predict(fit))
summary(fit)
Run the code above in your browser using DataLab