Hello,
In the following data, I want to randomly assign "foreign" year to "control firm" based on "acquisition percent per year". For instance, I want to assign 1990 to 0.2 percent of control firm, 0.1 percent to 1991 and so on. How can I do this in stata?
Thank you,
In the following data, I want to randomly assign "foreign" year to "control firm" based on "acquisition percent per year". For instance, I want to assign 1990 to 0.2 percent of control firm, 0.1 percent to 1991 and so on. How can I do this in stata?
Thank you,
foreign | acquisation percent per year | control firm | random | generate year | |
1990 | 0.2 | C15 | 0.003036765 | 1990 | |
1991 | 0.1 | C9 | 0.168831204 | 1990 | |
1992 | 0.15 | C12 | 0.179430892 | 1990 | |
1993 | 0.35 | C10 | 0.187849179 | 1990 | |
1994 | 0.2 | C3 | 0.300511008 | 1991 | |
C4 | 0.349749197 | 1991 | |||
C1 | 0.383394385 | ||||
C16 | 0.392541865 | ||||
C19 | 0.640032537 | ||||
C18 | 0.709030551 | ||||
C6 | 0.737769418 | ||||
C8 | 0.802163162 | ||||
C2 | 0.818150491 | ||||
C20 | 0.868747158 | ||||
C13 | 0.87968224 | ||||
C17 | 0.912942839 | ||||
C11 | 0.9380032 | ||||
C7 | 0.946397067 | ||||
C5 | 0.959596779 | ||||
C14 | 0.969432086 |