zglm {zfit} | R Documentation |
Run a glm model in a pipe
Description
These functions are wrappers for the glm function. The zglm
function can
be used to estimate any generalized linear model in a pipe. The zlogit
,
zprobit
, and zpoisson
functions can be used to estimate specific models.
All of these functions rely on the glm
function for the actual estimation,
they simply pass the corresponding values to the family
parameter of the
glm
function.
Usage of these functions is very similar to the zlm function (a wrapper for lm), for detailed examples, check out the entry for that function.
The zlogit
function calls zglm
, specifying family=binomial(link="logit")
.
The zprobit
function calls zglm
, specifying family=binomial(link="probit")
.
The zpoisson
function calls zglm
, specifying family="poisson"
.
Usage
zglm(
data,
formula,
family = gaussian,
weights,
subset,
na.action,
start = NULL,
etastart,
mustart,
offset,
control = list(...),
model = TRUE,
method = "glm.fit",
x = FALSE,
y = TRUE,
singular.ok = TRUE,
contrasts = NULL,
...
)
zlogit(data, formula, ...)
zprobit(data, formula, ...)
zpoisson(data, formula, ...)
Arguments
data |
A |
formula |
The |
family |
See the |
weights |
See the |
subset |
See the |
na.action |
See the |
start |
See the |
etastart |
See the |
mustart |
See the |
offset |
See the |
control |
See the |
model |
See the |
method |
See the |
x |
See the |
y |
See the |
singular.ok |
See the |
contrasts |
See the |
... |
Other arguments to be passed to the |
Value
A fitted model.
See Also
-
zlm is the wrapper for lm, probably the most common fitting function. The help file for zlm function includes several usage examples.