Hello!
I'm trying to create two dummy variables, namely:
- Dummy equal to 1 if the first sample year (1989) is the first year with a new auditor
- Dummy equal to 1 if the last sample year (1992) is followed by an auditor change
So in my example below, the variable 'au_n' has values ranging from 1 to 20 where each number represents a specific auditor.
Now I would like to find out if 1988 had a different au_n number than 1989 for my first dummy variable;
And if 1993 has a different au_n number than 1992 for my second dummy variable.
I have tried following https://www.stata.com/support/faqs/d...ions-in-group/
But it was not exactly what I was looking for, as I specifically wanted to check the change in the above mentioned years for my dummy variables.
Hope it's clear what I mean, thank you in advance!
I'm trying to create two dummy variables, namely:
- Dummy equal to 1 if the first sample year (1989) is the first year with a new auditor
- Dummy equal to 1 if the last sample year (1992) is followed by an auditor change
So in my example below, the variable 'au_n' has values ranging from 1 to 20 where each number represents a specific auditor.
Now I would like to find out if 1988 had a different au_n number than 1989 for my first dummy variable;
And if 1993 has a different au_n number than 1992 for my second dummy variable.
I have tried following https://www.stata.com/support/faqs/d...ions-in-group/
But it was not exactly what I was looking for, as I specifically wanted to check the change in the above mentioned years for my dummy variables.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str6 gvkey double fyear byte au_n "001004" 1987 6 "001004" 1988 6 "001004" 1989 6 "001004" 1990 6 "001004" 1991 6 "001004" 1992 6 "001009" 1988 4 "001009" 1989 4 "001009" 1990 4 "001009" 1991 4 "001009" 1992 4 "001009" 1993 4 "001010" 1988 20 "001010" 1989 6 "001010" 1990 6 "001010" 1991 6 "001010" 1992 6 "001010" 1993 6 end

Comment