Hello,
I have a variable, year, that has the year of birth of participants. I would like to create a new variable, age, that describes the age of each participant in 2023. I tried the following code: gen age=2023-year
I get a return of a mismatch error. Why and what would be the proper code to create my new variable?
Thanks in advance.
I have a variable, year, that has the year of birth of participants. I would like to create a new variable, age, that describes the age of each participant in 2023. I tried the following code: gen age=2023-year
I get a return of a mismatch error. Why and what would be the proper code to create my new variable?
Thanks in advance.
Comment