When comparing different medications, JAK inhibitors were found to have a higher risk of cancer than TNF inhibitors, but showed no difference in cancer risk compared to placebo or methotrexate. Overall, cancer was a rare occurrence across all treatments.