
Last chance! 50% off unlimited learning
Sale ends in
estimate a logistic regression
logit(y, x, subset = NULL, weights = NULL, linkfunc = "logit", ...)
name of the dependent variable
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.
conditions to run the command only of a subset of the data (analogous to "if" statements in Stata)
the name of a variable to use for weights in estimation
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
b coefficient vector
V covariance matrix of coefficients
# NOT RUN {
library(plm)
data(Produc)
use(Produc, clear=TRUE)
gen(empmedian, emp > median(emp))
r = logit(empmedian, unemp)
r
# }
Run the code above in your browser using DataLab