Dear All
I have data that shows firms required to restate "correct" their financial reports by a regulatory for being misstated before.
The data show that a firm may disclose to the public that it has restated previous years reports in, say 2005, called disclosure_yr in my dataset, but this does not necessarily mean that the 2005 report is a misstated report. The 2005 in my example would be the year when this has been only disclosed. The data show to which years misstatements belong. So in my example, this can be for years from 2001 to 2003, the 2001 year is called begin_year in my dataset and the 2003 is the end_year. All years from 2001 to 2003 were previously misstated. There is a variable called res that is 1 when the firm discloses (in the disclosure_date) that it has restated previously reports (within the being_year to end_year range), and zero otherwise. But the 1 value is assigned in the disclosure_yr
The data looks like:
In the above data, firm id 3116 has disclosed to the public in 2002 that years 2000 and 2001 were previously misstated.
I am struggling with creating a dummy variable that is :
equal to 1 for the misstated years (i.e. years between begin_yr and end_yr) , which might be tracked by res=1 in a later disclosure year, and zero otherwise
In other words, I want to assign a value of 1 for only the years that were previously misreported rather than the year when this issue has been disclosed. Note that res=1 here in the data corresponds with the disclosure-yr.
Then, I want to sort my data by the firm_id and disclosure_yr to be ready for merge with another data set.
I know the direct way for creating a dummy such that
gen dummy=0
replace dummy=1 if res=1
However this will not achieve my target because the res values (1/0) are not assigned on the basis of the misstated years, it is only for the disclosure year which I do not want to.
Any smart ideas ?
I have data that shows firms required to restate "correct" their financial reports by a regulatory for being misstated before.
The data show that a firm may disclose to the public that it has restated previous years reports in, say 2005, called disclosure_yr in my dataset, but this does not necessarily mean that the 2005 report is a misstated report. The 2005 in my example would be the year when this has been only disclosed. The data show to which years misstatements belong. So in my example, this can be for years from 2001 to 2003, the 2001 year is called begin_year in my dataset and the 2003 is the end_year. All years from 2001 to 2003 were previously misstated. There is a variable called res that is 1 when the firm discloses (in the disclosure_date) that it has restated previously reports (within the being_year to end_year range), and zero otherwise. But the 1 value is assigned in the disclosure_yr
The data looks like:
Firm_id | disclosure_yr | begin_yr | end_yr | res |
2178 | 2006 | 2005 | 2005 | 0 |
2491 | 2005 | 2002 | 2005 | 1 |
2491 | 2007 | 2004 | 2006 | 1 |
3116 | 2002 | 2000 | 2001 | 1 |
...... | ...... | ......... | ........ | 0 |
I am struggling with creating a dummy variable that is :
equal to 1 for the misstated years (i.e. years between begin_yr and end_yr) , which might be tracked by res=1 in a later disclosure year, and zero otherwise
In other words, I want to assign a value of 1 for only the years that were previously misreported rather than the year when this issue has been disclosed. Note that res=1 here in the data corresponds with the disclosure-yr.
Then, I want to sort my data by the firm_id and disclosure_yr to be ready for merge with another data set.
I know the direct way for creating a dummy such that
gen dummy=0
replace dummy=1 if res=1
However this will not achieve my target because the res values (1/0) are not assigned on the basis of the misstated years, it is only for the disclosure year which I do not want to.
Any smart ideas ?
Comment