The rats data set in the survival package in R can be loaded by typing “data(rats)”. It contains data on 300 rats3 selected from each of 100…