Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: hprescott error: multiple panels


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: hprescott error: multiple panels
Date   Thu, 9 Feb 2006 15:21:37 -0000

When you say "must" I think you mean "should". 

-hprescott- is written for single panels. That 
is indicated in the help. 

However, I think it can be applied to many panels
with a fairly simple trick. 

separate myvar, by(id) 
hprescott `r(varlist)', stub(mystub) 
egen mystub = rowmax(mystub_*) 

Nick 
[email protected] 

Nicolas Winkler

> I'm trying to detrend a variable using the hprescott command, 
> but after
> typing "hprescott myvar", I receive the error code: "r(459): 
> sample may
> not include multiple panels" !? 
> I don't have a problem with missings or duplicates and the data is
> correctly set as time-series. Now, I've run out of ideas on what the
> problem might be. hprescott does indeed work fine with singular panels
> (hprescott myvar if id==1), but there must be a way of using 
> the command
> on a range of panels. 
> Can anybody point me towards a solution? 
> �

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