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/