Dear All, Suppose that I have daily trading data for many years. (A sample of two-year data is "here"). I wish to generate a variable, say, event, which is equal to 0 on March 15 for each year. For trading data befoer March 15, `event' is equal to -1, -2, and so on. Similarly, for trading data after March 15, `event' is equal to 1, 2, and so on. Any suggestions are highly appreciated.
Related Posts with generate event time
Combining multiple variablesHello! I jsut started learning Stata and I am using a consensus data set and trying to combine a bu…
expression too long r(130) while specifying starting valuesI am using sfpanel() command and I need to set initial values for the variables before running the r…
Split file by group i.e. group 1 (non clinical) vs group 2 (clinical)Hi there, Might someone please advise how I split my Stata dataset by 1 variable "Group" which is h…
Anyone want to do my homework?Anyone want to do a statistics assignment for me? I am strugglinggg. It's an elementary course for S…
Combining multiple variablesHello! I just started learning Stata and I am using a consensus data set and trying to combine a bu…
Subscribe to:
Post Comments (Atom)
0 Response to generate event time
Post a Comment