Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: HAC Errors and glm


From   Bülent Köksal <[email protected]>
To   [email protected]
Subject   st: HAC Errors and glm
Date   Mon, 9 Jan 2012 11:16:33 +0200

Dear Stata Users,

By using Stata's glm command, we can fit models that are fit by other
Stata commands. glm can also calculate Heteroskedasticity and Serial
Correlation  (HAC) adjusted errors. From the Stata manual, for
example, the following newey and glm produces the same results.

use http://www.stata-press.com/data/r11/idle2, clear
tsset time
newey usr idle, lag(3)
glm usr idle, vce(hac nwest 3) vfactor(1.0714286)


My question is, does the fact that glm calculates HAC errors mean that
it is reasonable to do so for other models too?

For example, we can fit a logit model as:

glm y x1 x2, family(binomial) link(logit)

Assuming that we use time series data, does the following command make
sense to adjust for serial correlation?

glm y x1 x2, family(binomial) link(logit)  vce(hac nwest 1)

--
Bülent Köksal

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index