samedi 1 mai 2021

Random sample from set of observations with no repeat

I have a dataset of 50000 observations related to patients hospital appointment. i need to create a random sample dataset with only one single appointment for each patient. In my original dataset some patients had 12 appointments, however, for my analysis i need to include one appointment per patient. When i analysed my dataset there was 324100 unique patients ID which mean there were only 324100 patients who had 50000 appointments. So , i need a dataset with random 324100 appointments, one appointment per patient only. Any idea ??




Aucun commentaire:

Enregistrer un commentaire