Code for simulating time-varying survival data (time-varying covariates or effects)