I have a question about generating a variable that depicts the sum of a dummy variable up until point x. To help you understand, here is how my data looks like right now:
| platform | year | month | genre_id | Genre1_dummy | Genre2_dummy | Genre3_dummy | 
| microsoft | 2003 | 4 | 1 | 1 | 0 | 0 | 
| microsoft | 2003 | 8 | 3 | 0 | 0 | 1 | 
| macOS | 2002 | 1 | 1 | 1 | 0 | 0 | 
| macOS | 2002 | 4 | 2 | 0 | 1 | 0 | 
| macOS | 2003 | 8 | 1 | 1 | 0 | 0 | 
| platform | year | month | genre_id | Genre1_dummy | Genre2_dummy | Genre3_dummy | genre_1 | genre_2 | genre_3 | 
| microsoft | 2003 | 4 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 
| microsoft | 2003 | 8 | 3 | 0 | 0 | 1 | 1 | 0 | 1 | 
| macOS | 2002 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 
| macOS | 2002 | 4 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 
| macOS | 2003 | 8 | 1 | 1 | 0 | 0 | 2 | 1 | 0 | 
Thanks for your help. It is very much appreciated.
Best,
Sebastian
0 Response to Sum of dummy variable up until the point of observation
Post a Comment