Genentech / jmpost

https://genentech.github.io/jmpost/
17 stars 4 forks source link

Extend simulation functions to allow for custom covariates #327

Open gowerc opened 6 months ago

gowerc commented 6 months ago

Currently the survival simulation function is hard coded to only have 2 linear covariates cov_cat and cov_cont. Would be good to extend this somehow to allow for a more flexible specification from the SimSurvial objects.

gowerc commented 6 months ago

For reference this is pseudo already implemented via the sampleSubjects.SimSurvival method which could have sub-class specific implementations. Only problem is that sampleObservations.SimSurvival appears to be hard coded to look for the cov_cat and cov_cont variables which would need to be fixed. I'm not sure where else these variables are hard coded either. Might need some thinking about detaching this definition from the baseline-hazard though as at the moment you'd have to redefine all your survival distributions if you change the method (maybe this is fine?)