Good afternoon everyone,
I have a data set that lists lineups for soccer teams (variable names Player1 - Player11). Depending on where they are entered in the lineup corresponds to which variable they correspond to for that particular game. I am trying to run a fixed effects model for players and want to create a dummy variable for each of them. Unfortunately I only know how to do this for one specific variable (each player in Player 1 gets a dummy variable) rather than across all 11 (i.e if the same player appears as Player 2 and Player 5 in different games that still corresponds to the same dummy variable). I've looked online and in the manuals and found no way to do this easily.
Is there an easy way to code this in Stata or will I have to create some sort of loop to get around this?
Thanks for the help, it's much appreciated.
Guy
I have a data set that lists lineups for soccer teams (variable names Player1 - Player11). Depending on where they are entered in the lineup corresponds to which variable they correspond to for that particular game. I am trying to run a fixed effects model for players and want to create a dummy variable for each of them. Unfortunately I only know how to do this for one specific variable (each player in Player 1 gets a dummy variable) rather than across all 11 (i.e if the same player appears as Player 2 and Player 5 in different games that still corresponds to the same dummy variable). I've looked online and in the manuals and found no way to do this easily.
Is there an easy way to code this in Stata or will I have to create some sort of loop to get around this?
Thanks for the help, it's much appreciated.
Guy
Comment