geometric(link = "logit", earg=list(), expected = TRUE, method.init = 1)
Links
for more choices.earg
in Links
for general information.expected = TRUE
, else Newton-Raphson.1
or 2
or 3
which
specifies the initialization method for the probability.
If failure to converge occurs try another value."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.negbinomial
).negbinomial
,
Geometric
,
betageometric
,
expgeometric
,
rbetageom
.gdata = data.frame(x2 = runif(nn <- 1000) - 0.5)
gdata = transform(gdata, x3 = runif(nn) - 0.5,
x4 = runif(nn) - 0.5)
gdata = transform(gdata, eta = 1.0 - 1.0 * x2 + 2.0 * x3)
gdata = transform(gdata, prob = logit(eta, inverse=TRUE))
gdata = transform(gdata, y = rgeom(nn, prob))
with(gdata, table(y))
fit = vglm(y ~ x2 + x3 + x4, geometric, gdata, trace=TRUE)
coef(fit, mat=TRUE)
summary(fit)
Run the code above in your browser using DataLab