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]
RE: st: RE: combination of rolling and if
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
RE: st: RE: combination of rolling and if
Date
Wed, 14 Dec 2011 14:26:48 +0000
In addition, my advice in my first reply to you still stands.
-if- preselects observations before doing anything. Other observations won't be added in later for any reason.
If -if- bites you too hard, don't use it.
As said, I can't comment specifically on commands I can see, but this is a general Stata principle, already explained to you.
Nick
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: 14 December 2011 14:19
To: '[email protected]'
Subject: RE: st: RE: combination of rolling and if
We can't see your data and you do not show your exact detailed commands.
So we have no chance of reproducing your results and little chance of understanding _precisely_ what -if ST == 1- means.
Please read the Statalist FAQ again for advice on posting questions that can be answered.
Your best chance of getting good specific feedback is to replicate your problem with a concocted dataset or with one downloadable into Stata by everyone. -help q_cross- shows what panel datasets there are.
Nick
[email protected]
qing ye
I found that if I use if with tssmonth , what it does is still,
for every month, calulate average return for the next 12 months for
the observations whose 'ST'==1 at each period.
But this is not what I want, I want to take the stocks whose current
period 'ST'==1 and calculate the returns for this group over the next
12 months. so my group of stocks are those whose current period
'ST'==1, I don't care whether their 'ST'==1 or not in any of the next
12 period. But -if- seems only care whether 'ST'==1 in the periods
included in the 'windows'.
How do I solve this?
*
* 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/