Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying which variables to vary by group in fit_stan_survival_model #47

Open
e5c opened this issue Jan 9, 2017 · 1 comment

Comments

@e5c
Copy link
Member

e5c commented Jan 9, 2017

The pem_survival_model_varying_coefs model allows us to test the grouping of one continuous feature (or collection of continuous features) by a categorical feature. The former is specified by formula and the latter by group_col in fit_stan_survival_model. We'd like to be able to specify which continuous features we want to group and those we do not, in just one fit_stan_survival_model instance.

@e5c e5c added the enhancement label Jan 9, 2017
@jburos
Copy link
Member

jburos commented Jan 9, 2017

Thanks @e5c ..

One thing I've been thinking about is how best to support this in the API for fit_stan_survival_model.

  • Option 1: update patsy formula syntax to support this, perhaps analogous to lmer-style-syntax in R. Using lmer-style-syntax, the formula would read something like ~ age + bmi + (age|sex) to allow age but not bmi to vary by sex.
    • In the long run, going in this direction will allow greater flexibility (e.g. we would use a similar approach when selecting which covariates are allowed to vary over time).
  • Option 2: create a new argument to capture the "varying" formula separate from the "non-varying" formula. this would require that we give two formula objects to support the above scenario, e.g.: formula_varying = 'age', formula = 'bmi'.
    • this is the simplest to implement, and possibly the easiest to understand
    • could get complicated if we have many grouping-levels, etc.

Noting here to get your feedback on these competing approaches & also noting here for benefit of others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants