Statalist


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

Re: st: Newey west


From   Michael Hanson <mshanson@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Newey west
Date   Wed, 10 Dec 2008 10:04:38 -0500

Discussion of this error message with -newey- comes up from time to time on Statalist: search the archives for more. There are multiple reasons why this error may arise. Alice does not provide enough information to know for sure, but I suspect that her problem is either that the sample that is used in her estimation actually is not balanced (even if the overall sample may be), or the time interval between her date variables is not constant (even if the estimation sample is balanced). For example, a balanced panel with annual observations that skips a year will (rightly) throw up that error with -newey-. Jared's proposed solution will "solve" this problem from a computational perspective, but it arguably is not valid from an inferential one (although that conclusion depends on unstated details about the data structure and the research question).

For additional discussion on this topic recently, see, e.g.,:

<http://www.stata.com/statalist/archive/2008-10/msg00621.html>
<http://www.stata.com/statalist/archive/2008-10/msg00702.html>

Hope this helps,
Mike


On Dec 10, 2008, at 9:12 AM, Jared DeLisle wrote:

I've had this problem when I have panel data of firms over time (say monthly data), and there is one month missing from the sample. I get around the problem in the following manner. Say the firm variable is "firm" and the monthly time variable is "date". Then:

egen date_count=group(date)
tsset firm date_count

This creates a continuous variable for the date with no skips. Keep in mind I'm a novice myself, so there may be a better way, but this works for me.

Jared

Alice wrote:
Hi,

I am trying to use the command -newey- using panel data and I include fixed effects. However this does not work (Stata tells me that my year variable is not regularly spaced).

Any suggestions? What does the error message mean? My sample is however balanced over time so I have the same number of observations in each year.

Thanks, Alice.



*
*   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/


*
*   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index