logit: estimate a logistic regression

Description Usage Arguments Value Examples

Description

estimate a logistic regression

Usage

1
logit(y, x, subset = NULL, weights = NULL, linkfunc = "logit", ...)

Arguments

y

name of the dependent variable

x

names of the independent variables in varlist format, either "x1 x2 x3" or if it is a single variable it does not need to be quoted.

subset

conditions to run the command only of a subset of the data (analogous to "if" statements in Stata)

weights

the name of a variable to use for weights in estimation

linkfunc

specify the linking function (logit, by default). Can set to "probit" to do probit estimation or use probit (which is equivalent).

...

other options to pass to glm

Value

b coefficient vector

V covariance matrix of coefficients

Examples

1
2
3
4
5
6
library(plm)
data(Produc)
use(Produc, clear=TRUE)
gen(empmedian, emp > median(emp))
r = logit(empmedian, unemp)
r

genvar documentation built on Jan. 21, 2020, 9:07 a.m.