Dear all,
This might be a trivial question, however, I am posting as I have searched multiple stata help pdfs without a relevant answer.
I am looking at a set of longitudinal data, whereby individuals have multiple values i.e
id value time
1 50 100
1 60 140
1 70 200
2 30 115
2 35 150
3 45 170
3 50 200
I am looking to categorize them into groups of >= 50 vs < 50.
However given the multiple values per indvidual, I would have
Is there a way to group them into my 2 groups of >=50 and < 50, while counting the number of distinct ids?
i.e for the dataset above, there would be 3 individuals instead of 7 observations.
Thanks for any help provided
Related Posts with Grouping multiple entries for a distinct id in longitudinal data
How to change the look of a subset of bars using specific criteria - bar graphsDear all, I am working with a dataset that contains the number of candidates for each call of a stu…
need help with import excelSorry I have tried this using import excel, copying the data directly, and using Stat Transfer, but …
Graphing one product verses an average of all other productsHi All, I am having trouble thinking how I can graph an average of two products ("Coca-Cola" and "t…
Confusing behavior by -more-I'm trying to use -more- to force a pause between display commands in a loop. Here is the code: Co…
How to make a Difference in Differences GraphI want to make a graph showing parallel slopes for the following data. The variable REGION consists …
Subscribe to:
Post Comments (Atom)
0 Response to Grouping multiple entries for a distinct id in longitudinal data
Post a Comment