Skip to contents

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 data.frame containing the model data.

formula

The formula to be fitted.

family

See the glm function.

weights

See the glm function.

subset

See the glm function.

na.action

See the glm function.

start

See the glm function.

etastart

See the glm function.

mustart

See the glm function.

offset

See the glm function.

control

See the glm function.

model

See the glm function.

method

See the glm function.

x

See the glm function.

y

See the glm function.

singular.ok

See the glm function.

contrasts

See the glm function.

...

Other arguments to be passed to the glm function.

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.