0

I have df1:

IDCode   Score Score2
ID4,ID8  3     2
ID2      2     3
ID6      10    5
ID300    4     2
ID100    2     3
ID5,ID3  1     2
ID100    5     8
ID4,ID8  2     10

I am running a GEE regression with the IDCode as my cluster but that requires my ID's to be numerical. Is there a way to give each unique IDCode a unique numerical value?

Output would be:

 IDCode   Score Score2
 33      3     2
 8       2     3
 12      10    5
 50      4     2
 17      2     3
 10      1     2
 17      5     8
 33      2     10

I don't care what the numbers in the column are, as long as they are unique but match to matching IDs.

Ronak Shah
  • 355,584
  • 18
  • 123
  • 178
Evan
  • 1,427
  • 1
  • 13
  • 30

0 Answers0