Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: newey2


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: newey2
Date   Tue, 30 Mar 2004 12:15:12 -0500

Note that 'force' has no effect for panel data sets, per newey2 help.
The error you cite can be generated by creating missing values in the timevar (betime). See below. The error message is not coming from newey2, but rather from tsfill,full, which it invokes. Presumably newey2 should trap the flaws in the calendar prior to this -- but the error appears to be correct diagnosis.

Kit

. webuse grunfeld

. newey2 invest mvalue ,lag(1)

(runs ok, no problem)

(I made a couple of changes in year, to make it missing)

. tsset
panel variable: company, 1 to 10
time variable: year, 1935 to 1954, but with gaps


. newey2 invest mvalue ,lag(1)

timevar (year) may not contain missing values when option full is specified
r(451);

.

On Mar 30, 2004, at 2:33 AM, Clive wrote:



I'm currently having difficulties with using -newey2- in trying to fit an
OLS/Newey-West model comprising 102 sequentially-ordered by-elections.

. tsset id betime
panel variable: id, 1 to 3457
time variable: betime, 1 to 102

. newey2 becon clmargin [aw=region], lag(1) force

timevar (betime) may not contain missing values when option full is specified
r(451);

I can't understand what I'm doing wrong here, and I certainly don't
understand what "option full" means here (it's not mentioned in -whelp
newey2-). There are neither any missing values in -tid- nor in the two
x-variables you see in the example. I've also tried running it without the
weight, without -force- and by entering -in 1/102- (having -sort-ed on
- -tid-, of course), but exactly the same error returns every time.

Statalisters will recall that last week, Justina Fischer posted a
reasonably similar difficulty with running -newey- (without wishing to
misrepresent her), to which -newey2- was given as the solution! I've also
tried running -newey- as well, but that hasn't worked either. The payoff
gained from unlocking the key to this, from a BLUE point of view, would be
immense.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index