Good evening, I'm working with a panel data set consisting of firm-year observations. This data set includes a dummy variable called "acquisition" that equals 1 if the firm made an acquisition during the current year and 0 otherwise. Now, I'd like to construct a new dummy variable that captures prior acquisition experience. More specifically, I'd like for this new variable to equal 1 if the acquisition dummy for this firm equals 1 in any prior year and 0 otherwise. Unfortunately, I'm having trouble figuring out the appropriate code. I thought it would be easiest to first create a count variable that reveals the number of prior years with merger activity and then construct a dummy variable equal to 1 any time the count variable carries a non-zero value. However, I can't seem to get the count variable to work. Does anyone have any advice? For simplicity, you can just assume that the data set consists of 3 variables: id, year, and acquisition (a dummy variable). Thank you! Aimee
... View more