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: strange "not sorted" error
From
Tatyana Deryugina <[email protected]>
To
[email protected]
Subject
st: strange "not sorted" error
Date
Mon, 14 Nov 2011 20:32:33 -0600
Hi,
I'm running a simple regression after which I would like to generate
predicted residuals. The code (for Stata 11) goes something like this:
tsset county_fips year
areg outcome depvar L.depvar i.year#i.state_fips, absorb(county_fips)
cluster(state_fips)
tsset county_fips year
predict outcome_r, residuals
The code breaks down on the fourth line and gives me an r(5) "not
sorted" error. Note that I added the second "tsset county_fips year"
during debugging - the code also breaks down when it is not there.
I've looked through the documentation to try to find what I'm supposed
to sort by, but I can't figure it out. Any suggestions?
Best,
Tatyana
---------------------------------------------------------------
Tatyana Deryugina
Lecturer, Department of Finance
University of Illinois, Urbana-Champaign
(925) 349 - 8999 (cell)
*
* 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/