Learn R Programming

erer (version 1.3)

maBina: Marginal Effect for Binary Probit and Logit Model

Description

This function calculates marginal effects for a binary probit or logit model and their standard errors.

Usage

maBina(w, x.mean = TRUE, rev.dum = TRUE, digits = 3, ...)

Arguments

w
a binary probit or logit model object estimated from glm().
x.mean
a logical value (default of TRUE) of whether to calculate marginal effects at the means of independent variables. If FALSE, marginal effects are calculated for each observation and then averaged.
rev.dum
a logical value (default of TRUE) of whether to revise the estimates and standard erros for binary independant variables. If FALSE, derivatives are taken on binary independant variables as continuous variables.
digits
number of digits for output.
...
additional arguments to be passed.

Value

  • Return a list object of class "maBina" with the following components:
  • linklink function used in the binary model;
  • f.xbscale factor of marginal effects, calculated as the density function evaluated at the means of the variables when x.mean = TRUE is specified or the average density value for all individual observations when x.mean = FALSE is specified;
  • wa binary probit or logit model object estimated from glm();
  • outa data frame object of marginal effects, t-value, and p-value.

Details

Marginal effects from a binary probit or logit model is calculated. The two choices are the method of averaging effects and revising estimates for dummy variables. Marginal effects can be calculated at the mean of the independent variables (i.e., x.mean = TRUE), or as the average of individual marginal effects at each observation (i.e., x.mean = FALSE). rev.dum = TRUE allows marginal effects for dummy variables are calculated differently, instead of treating them as continuous variables.

References

Greene, W.H. 2003. Econometric Analysis (5th ed.). Prentice Hall, New York. 1026 P.

See Also

maTrend; plot.maTrend.

Examples

Run this code
data(daPe)
ma <- glm(grade ~ gpa + tuce + psi, x = TRUE, 
    data = daPe, family = binomial(link = "probit"))
ea <- maBina(w = ma, x.mean = TRUE, rev.dum = TRUE)
ea

Run the code above in your browser using DataLab