Consider the following blood pressur log panel data:
[QUOTE=Mike Lacy;n1751465]
I would like to obtain the following measures:
1) the number of logs per patientid per day
2) the average number of logs per day (across patientid)
3) the number of logs for each patient for the entire sample
Thanks in advance!
[QUOTE=Mike Lacy;n1751465]
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte patientid double time int sys byte dia 1 20jan2024 08:00:00 123 77 1 20jan2024 22:00:00 135 80 1 22jan2024 03:00:00 128 70 2 15jan2024 03:00:00 117 68 2 16jan2024 21:00:00 160 100 3 21jan2024 09:00:00 155 90 4 28jan2024 03:00:00 140 88 4 29jan2024 13:00:00 121 72 4 30jan2024 23:00:00 120 70 end
1) the number of logs per patientid per day
2) the average number of logs per day (across patientid)
3) the number of logs for each patient for the entire sample
Thanks in advance!
