binomreg {micsr}R Documentation

Binomial regression

Description

A unified interface for binomial regression models, including linear probability, probit and logit models

Usage

binomreg(
  formula,
  data,
  weights,
  subset,
  na.action,
  offset,
  contrasts = NULL,
  link = c("identity", "probit", "logit"),
  method = c("ml", "twosteps", "minchisq", "test"),
  start = NULL,
  ...
)

## S3 method for class 'binomreg'
residuals(object, ..., type = c("deviance", "pearson", "response"))

## S3 method for class 'binomreg'
glance(x, ...)

## S3 method for class 'binomreg'
predict(object, ..., type = c("response", "link"), newdata = NULL)

Arguments

formula

a symbolic description of the model

data

a data frame,

subset, weights, na.action, offset, contrasts

see stats::lm,

link

one of "identity", "probit" and "logit" to fit respectively the linear probability, the probit and the logit model

method

"ml" for maximum likelihood (the only relevant method for a regression without instrumental variables), "twosteps" for two-steps estimator, "minchisq" for minimum chi-squared estimator and "test" to get the exogeneity test

start

a vector of starting values

...

further arguments

object, x, type

a binomreg object and the type of residuals for the residuals method

newdata

a new data frame for the predict method

Value

an object of class c("binomreg", "micsr"), see micsr::micsr for further details

Examples

pbt <- binomreg(mode ~ cost + ivtime + ovtime, data = mode_choice, link = 'probit')
lpm <- binomreg(mode ~ cost + ivtime + ovtime, data = mode_choice, link = 'identity')
summary(pbt, vcov = "opg")

[Package micsr version 0.1-1 Index]