I have a dataset consisting of repeated measures(4 waves), one data point per row. These data are from a longitudinal study and therefore at the moment, not every subject has all data points.
the data looks like
<subject_id waves Value>
1 wave1 23
1 Wave2 13
1 Wave3 12
2 Wave1 25
2 Wave2 31
2 Wave3 34
2 Wave4 25
3 Wave1 18
3 Wave2 34
4 Wave1 30
5 Wave1 19
5 Wave2 28
5 Wave3 25
5 Wave4 31
6 Wave1 50
6 Wave2 35
7 Wave1 33
7 Wave2 35
7 Wave3 41
7 Wave4 25
So,
subject 1 has three repeated measures
subject 2,5, & 7 have four repeated measures
subject 3 has two repeated measures
subject 4 has one measure.
I would like to be able to extract all data points involved in all repeated measures or those with two repeated measures.
The background of my question was to create a new data frame for those who have measured in all waves removing subject 1, 3 and 4.
Any thoughts, please?