Minor bug syn.survctree
Closed this issue · 3 comments
Hello,
Thanks for the nice package! When trying to use synthpop with survival outcomes, I noticed the call would always end up in the environment browser. To fix this, you would need to comment our the (unnecessary?) browser()
call in syn.survctree here.
I would also suggest to update the documentation for syn.survctree: currently it states
NOTE that when the function is called by setting elements of method in syn() to "survctree", the parameter minbucket can be supplied to syn() as e.g. survctree.minbucket.
.. which might suggest that the yevent argument should be supplied to syn()
as survctree.yevent = event_indicator
. However, source code instead suggests that a named list should be supplied as syn(..., event = list("time_variable" = "event_indicator")
. Would be nice for the users to know this :-)
Dear Gillian,
Great! I would agree that parametric survival methods would be welcome.
I have a dataset which I am not allowed to share but for which I wanted to try and make a synthetic copy (for later sharing/code-checking) using synthpop. It has a time to event outcome, and missing baseline covariates which were imputed using multiple imputation. With syn()
on the original dataset pre-imputation, the marginal distributions and missing data patterns seem really nicely conserved, but the outcome model (i.e. complete case analysis) results do differ a fair amount - maybe to be expected since this is a single synthetic dataset.
I wonder if it would be better to create the synthetic dataset based on a imputed dataset instead, and then induce the missing values. I will play around with it some more..
Best wishes,
Ed
synthpop 1.7-0 that is available now on GitHub has an improved error messages and help file for syn.survctree(). The reported bug has been fixed. Parametric survival methods are not available yet.