New factor variables features in Stata
- Publication date
- Publisher
Abstract
In this presentation, I cover how to use the new factor variables features in Stata 11. Stata’s new factor variables notation allows you to identify categorical covariates as factor variables, provides a convenient notation for specifying indicator variables without having to generate them, and allows interactions of factor variables with other factor variables or continuous covariates. We will also cover the new margins postestimation command. margins is a powerful yet easy-to-use command for computing expected marginal means, predictive margins, adjusted predictions, average marginal effects, and conditional marginal effects. Standard errors in margins can be estimated conditionally on the observed/specified covariate values or unconditionally via linearization.