Hello Statalist, I hope everyone is fine.
In my event study, I have event variable (EV) contain 1100 events for a panel dataset
I set event_window 10 days before and after the announcement day (EV date)
EV is a continuous variable and it's values are positive and negative
Specifically, 700 EV = positive values and 400 = negative values
my dependent variable is Y and independent variable is X,
The Y and X values only exist on the event_window dates (which is 10 days before and after EV)
my query is: I want to split my dependent variable (Y) into Yp and Yn
Yp = if EV is positive, then consider Y and X values all firm-year observation of a panel dataset for that event_window (10 days before and after dates of EV)
Yn = similar treatment as Yp but for negative values of EV
Thanks
Related Posts with Group-wise value assignment
Dropping variables by number of non-missing valuesWorking with Stata 15 on Mac OS Sierra, I'm attempting to work with Oklahoma voting data (available …
Merging two data filesNewbie here. I am trying to merge two files - one is a headteacher survey from 200 schools. The sec…
Coefplot: Labelling interactions with a month-year dateHello, I am using the command coefplot and need to label the axis for an interaction between a time…
Create a variable from other dummiesHello, I have 4 variables (coded 1=yes; 0=no) that tap into whether respondents used social media d…
Median survival not reachedHello fellow statalisters, I would like to ask the community for some help regarding a survival ana…
Subscribe to:
Post Comments (Atom)
0 Response to Group-wise value assignment
Post a Comment