»  Home »  Products »  Features »  Generalized linear models

Generalized linear models

Link functions

  • Identity
  • Log
  • Logit
  • Probit
  • Complementary log-log
  • Power
  • Odds power
  • Negative binomial
  • Log-log
  • Log-complement


  • Gaussian (normal)
  • Inverse Gaussian
  • Bernoulli/binomial
  • Poisson
  • Negative binomial
  • Gamma

Choice of estimation method

  • Maximum likelihood
  • Iteratively reweighted least squares (IRLS)

Customizable functions

  • User-defined link functions
  • User-defined variance functions
  • User-defined HAC kernels

Choice of variance estimates and standard errors

  • Inverse Hessian
  • Outer product of the gradients (OPG)
  • Observed information matrix
  • Expected information matrix
  • Robust Huber/White/sandwich estimator
  • Robust variance with clustered/correlated data
  • Heteroskedasticity- and autocorrelation-consistent (HAC) with Newey–West, Gallant, Anderson, or community-contributed kernel
  • Jackknife
  • Bootstrap

Bayesian estimation

    GEE estimation for panel data

    • Correlation structures
      • Exchangeable
      • Independent
      • Unstructured
      • Autoregressive
      • Stationary
      • Nonstationary
      • Fixed
    • Conventional, robust, bootstrap, and jackknife standard errors

    Multilevel mixed-effects GLMs

    • Two-, three-, and higher-level models
    • Nested (hierarchical) and crossed models
    • Random intercepts and slopes
    • Bayesian estimation

    Postestimation Selector

    • View and run all postestimation features for your command
    • Automatically updated as estimation commands are run


    • Expected value of dependent variable
    • Anscombe residual
    • Cook’s distance
    • Deviance residual
    • Diagonal of hat matrix
    • Likelihood residual
    • Pearson residual
    • Response residual
    • Score residual
    • Working residual

    Factor variables

    • Automatically create indicators based on categorical variables
    • Form interactions among discrete and continuous variables
    • Include polynomial terms
    • Perform contrasts of categories/levels
    Watch Introduction to Factor Variables in Stata tutorials

    Marginal analysis

    • Estimated marginal means
    • Marginal and partial effects
    • Average marginal and partial effects
    • Least-squares means
    • Predictive margins
    • Adjusted predictions, means, and effects
    • Works with multiple outcomes simultaneously
    • Contrasts of margins
    • Pairwise comparisons of margins
    • Profile plots
    • Graphs of margins and marginal effects
    Watch Introduction to margins in Stata tutorials
    Watch Profile plots and interaction plots in Stata tutorials

    Additional resource

    See test, predictions, and effects.

    See New in Stata 17 to learn about what was added in Stata 17.





    The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn YouTube Instagram
    © Copyright 1996–2022 StataCorp LLC   •   Terms of use   •   Privacy   •   Contact us