Hi guys,
I try to wirte my first loop, but it does not work well. Hopefully, you may help.
I have data of an experiment which obtains 32 rounds. I would like to rename the variables, e.g., Player.1.income => income1.
Due to my research, I started with the follwing loop:
forv num=1/32 {
drop Player.`num'.income
}
But what is coming next? I only defined the "first part" and do not tell Stata to change it into income1.
Im looking forward to hearing from you!
I try to wirte my first loop, but it does not work well. Hopefully, you may help.
I have data of an experiment which obtains 32 rounds. I would like to rename the variables, e.g., Player.1.income => income1.
Due to my research, I started with the follwing loop:
forv num=1/32 {
drop Player.`num'.income
}
But what is coming next? I only defined the "first part" and do not tell Stata to change it into income1.
Im looking forward to hearing from you!
Comment