stan-dev / stan-dev/rstanarm

Survival models

Open
#280 47 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

I'm opening this issue so there is a forum in which to discuss progress on getting survival models into rstanarm.

I've started a new survival branch here. It currently has a stan_surv modelling function, calling a surv.stan model file. The modelling function returns an object of class stansurv that inherits stanreg.

The current task list looks something like:

  • print method for stansurv
  • summary method for stansurv
  • prior_summary method for stansurv
  • basehaz_summary method for stansurv
  • posterior_survfit method for stansurv
  • log_lik, loo, and waic method for stansurv
  • plot method that includes plot type for baseline hazard
  • add option for rcs splines for the log hazard (i.e. instead of B-splines)
  • get the piecewise constant baseline hazard from stan_jm working with stan_surv
  • attempt to implement a constrained log-likelihood by just shifting hazard (setting equal to 1E-8 or similar) when the hazard strays negative, see section 2.2 of this paper
  • add functionality for time-dependent effects (i.e. non-proportional hazards) -- should this use survival package's tt approach, or something else (e.g. a tde() special function for use in the formula)
  • add AFT models
  • add semi-parametric model (possibly like this paper)
  • add frailty models

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the survival branch and read the current stan_surv function, surv.stan model file, and stansurv methods. Choose one unchecked task, such as basehaz_summary or rcs splines, then confirm its expected behavior with the existing completed methods and tests; done means that task works for stansurv without broadening the scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.