Hello, I am hoping to find help with what is probably a simple problem for coders.
I have a data set that shows a month by month account of a single "person" (ID), a date variable showing each month he is in the data set and a variable that indicates if he is in his trade on that date.
I am trying to count the number of months since last in trade for that specific person (ID) when that person is not in trade. Last in trade on months he is IN trade should be 0.
An example can be seen below where I manually counted these months.
Thank you,
Jean-Michel Galarneau
I have a data set that shows a month by month account of a single "person" (ID), a date variable showing each month he is in the data set and a variable that indicates if he is in his trade on that date.
I am trying to count the number of months since last in trade for that specific person (ID) when that person is not in trade. Last in trade on months he is IN trade should be 0.
An example can be seen below where I manually counted these months.
Thank you,
Jean-Michel Galarneau
Comment