st: FW: question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

st: FW: question

PETRESKI Marjan
Dear Statausers,

Looking for how to perform HP filter with multiple panels, I came across
Nick Cox's reply to Nicolas Winkler. The syntax is as follows:

levelsof id, local(ID)

foreach I of local ID {
        hprescott myvar if id == `I', stub(foo)
}

egen foo = rowmax(foo*_*)


However, when I apply this procedure, I get the smoothed series only for
the first country. Could you please instruct me on how to improve and
have smoothed series for all N in the panel?

Thanks.
Sincerely,

Mr. Marjan Petreski, PhD cand.
Staffordshire University
Leek Road 229
Stoke on Trent, Staffordshire
United Kingdom
web: www.linkedin.com/in/mpetreski


The information in this email is confidential and is intended solely for
the addressee.  Access to this email by anyone else is unauthorised.  



If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, except for the purpose of delivery to the addressee, is prohibited
and may be unlawful.  Kindly notify the sender and delete the message
and any attachment from your computer.


The information in this email is confidential and is intended solely for the addressee.  Access to this email by anyone else is unauthorised.  



If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, except for the purpose of delivery to the addressee, is prohibited and may be unlawful.  Kindly notify the sender and delete the message and any attachment from your computer.


*
*   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/
Reply | Threaded
Open this post in threaded view
|

st: RE: FW: question

Nick Cox
Looking at my code again I see no problem, although that's no guarantee
of anything. But the issue is what you typed, not what I recommended. As
the FAQ advises, and grizzled list members have read too many times,

"Say exactly what you typed and exactly what Stata typed (or did) in
response. N.B. exactly! If you can, reproduce the error with one of
Stata's provided datasets or a simple concocted dataset that you include
in your posting."

Nick
[hidden email]

P.S. -hprescott- is to be found on SSC.

PETRESKI Marjan

Looking for how to perform HP filter with multiple panels, I came across
Nick Cox's reply to Nicolas Winkler. The syntax is as follows:

levelsof id, local(ID)

foreach I of local ID {
        hprescott myvar if id == `I', stub(foo)
}

egen foo = rowmax(foo*_*)

However, when I apply this procedure, I get the smoothed series only for
the first country. Could you please instruct me on how to improve and
have smoothed series for all N in the panel?

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