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
Avergaing values of variables to reduce survey observationsHi, I am looking for a solution to average the survey respones. Below S007 is suvey respondent ID, …
how to know whether a placebo test is passedHello! I'm conducting a placebo test on a staggered DID, I randomly assign treatment firms and poli…
Something wrong with -colorpalette-Dear Stata users, I have installed the -colorpalette- wrote by Ben Jann, and I remenber that it run…
testing the validy of the instrument in xtivregHi, I am using xtivreg , where xtivreg y (x=z) The issue is that how can i tell that the instrume…
Example of GMM moment-evaluator program with many equationsHi, Statalist, Does anybody know a simple example of how to implement the moment-evaluator program …
Subscribe to:
Post Comments (Atom)
0 Response to Grouping multiple entries for a distinct id in longitudinal data
Post a Comment