11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

360 [ U ] 26 Overview of Stata estimation commands26.4 Generalized linear modelsThe generalized linear model isg{E(y j )} = x j β,y j ∼ Fwhere g() is called the link function and F is a member of the exponential family, both of whichyou specify before estimation. glm fits this model.The GLM framework encompasses a surprising array of models known by other names, includinglinear regression, Poisson regression, exponential regression, and others. Stata provides dedicatedestimation commands for many of these. Stata has, for instance, regress for linear regression,poisson for Poisson regression, and streg for exponential regression, and that is not all of theoverlap.glm by default uses maximum likelihood estimation and alternatively estimates via iteratedreweighted least squares (IRLS) when the irls option is specified. For each family, F , there isa corresponding link function, g(), called the canonical link, for which IRLS estimation producesresults identical to maximum likelihood estimation. You can, however, match families and link functionsas you wish, and, when you match a family to a link function other than the canonical link,you obtain a different but valid estimator of the standard errors of the regression coefficients. Theestimator you obtain is asymptotically equivalent to the maximum likelihood estimator, which, insmall samples, produces slightly different results.For example, the canonical link for the binomial family is logit. glm, irls with that combinationproduces results identical to the maximum-likelihood logit (and logistic) command. The binomialfamily with the probit link produces the probit model, but probit is not the canonical link here. Hence,glm, irls produces standard error estimates that differ slightly from those produced by Stata’smaximum-likelihood probit command.Many researchers feel that the maximum-likelihood standard errors are preferable to IRLS estimates(when they are not identical), but they would have a difficult time justifying that feeling. Maximumlikelihood probit is an estimator with (solely) asymptotic properties; glm, irls with the binomialfamily and probit link is an estimator with (solely) asymptotic properties, and in finite samples, thestandard errors differ a little.Still, we recommend that you use Stata’s dedicated estimators whenever possible. IRLS—thetheory—and glm, irls—the command—are all encompassing in their generality, meaning thatthey rarely use the right jargon or provide things in the way you wish they would. The narrowercommands, such as logit, probit, and poisson, focus on the issue at hand and are invariablymore convenient.glm is useful when you want to match a family to a link function that is not provided elsewhere.glm also offers several estimators of the variance–covariance matrix that are consistent, even whenthe errors are heteroskedastic or autocorrelated. Another advantage of a glm version of a modelover a model-specific version is that many of these VCE estimators are available only for the glmimplementation. You can also obtain the ML–based estimates of the VCE from glm.26.5 Binary-outcome qualitative dependent-variable modelsThere are many ways to write these models, one of which isPr(y j ≠ 0) = F (x j β)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!