Description Usage Arguments Value Author(s) References Examples

View source: R/DAMisc_functions.R

Norton and Ai (2003) and Norton, Wang and Ai (2004) discuss methods for calculating the appropriate marginal effects for interactions in binary logit/probit models. These functions are direct translations of the Norton, Wang and Ai (2004) Stata code.

1 |

`obj` |
A binary logit or probit model estimated with |

`vars` |
A vector of the two variables involved in the interaction. |

`data` |
A data frame used in the call to |

A data frame with the following variable:

`int_eff` |
The correctly calucalted marginal effect. |

`linear` |
The incorrectly calculated marginal effect following the linear model analogy. |

`phat` |
Predicted Pr(Y=1|X). |

`se_int_eff` |
Standard error of |

`zstat` |
The interaction effect divided by its standard error |

Dave Armstrong (UW-Milwaukee, Department of Political Science)

Norton, Edward C., Hua Wang and Chunrong Ai. 2004. Computing Interaction Effects and Standard Errors in Logit and Probit Models. The Stata Journal 4(2): 154-167.

Ai, Chunrong and Edward C. Norton. 2003. Interaction Terms in Logit and Probit Models. Economics Letters 80(1): 123-129.

Norton, Edward C., Hua Wang and Chunrong Ai. 2004. inteff: Computing Interaction Effects and Standard Errors in Logit and Probit Models, Stata Code.

1 2 3 4 5 6 7 8 9 | ```
data(france)
mod <- glm(voteleft ~ age*lrself + retnat + male, data=france, family=binomial)
out <- intEff(obj=mod, vars=c("age", "lrself"), data=france)
plot(out$phat, out$int_eff, xlab="Predicted Pr(Y=1|X)",
ylab = "Interaction Effect")
ag <- aggregate(out$linear, list(out$phat), mean)
lines(ag[,1], ag[,2], lty=2, col="red", lwd=2)
legend("topright", c("Correct Marginal Effect", "Linear Marginal Effect"),
pch=c(1, NA), lty=c(NA, 2), col=c("black", "red"), lwd=c(NA, 2), inset=.01)
``` |

DAMisc documentation built on May 30, 2017, 8:12 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.