ID <- rep(1:50, each = 5)
Age <- rep(31:35, times = 50)
State <- sample(1:5,size=250,replace=TRUE)
Death <- rep(c(0,0,0,0,1),times=50)
Example <- data.frame(ID,Age,State,Death)
Example$trans <- CreateTrans(Example$ID,Example$Age, Example$State,Example$Death,states=6)
Run the code above in your browser using DataLab