Hello, I am very new to Stata and need help with some simple commands.
I have got data from participants who have been measured repeatedly across different visits to see how variables change with ageing. I would like to calculate how many times each participant has been measured.
The data are in long form. Is there a way to create a new variable that assigns an observation number (e.g. first observation, second observation, third observation)? And calcuate the mean number of observations per participant?
Thanks
I have got data from participants who have been measured repeatedly across different visits to see how variables change with ageing. I would like to calculate how many times each participant has been measured.
The data are in long form. Is there a way to create a new variable that assigns an observation number (e.g. first observation, second observation, third observation)? And calcuate the mean number of observations per participant?
Thanks

Comment