How to calculate the overall mean (over all IDs) of a repeated measure (LifeQuality).
Caveat: the number of data points across ID is different (e.g.; ID 1 has 5 entries for LifeQuality; ID 2 has 3 entries for LifeQuality etc.)
clear
input byte(ID LifeQuality)
1 2
1 6
1 8
1 7
1 9
2 2
2 2
2 1
3 5
3 6
3 3
3 4
3 5
3 6
3 7
end
Caveat: the number of data points across ID is different (e.g.; ID 1 has 5 entries for LifeQuality; ID 2 has 3 entries for LifeQuality etc.)
clear
input byte(ID LifeQuality)
1 2
1 6
1 8
1 7
1 9
2 2
2 2
2 1
3 5
3 6
3 3
3 4
3 5
3 6
3 7
end
Comment