censored weibull function
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
From @bob-carpenter on December 4, 2014 2:48
Aki Vehtari suggested building in a function that behaves like some R survival analysis packages:
real weibull_right_censored_log(real y, real sigma, real alpha, int z) {
if (z == 0) return weibull_log(y,alpha,sigma);
else return weibull_ccdf_log(y,alpha,sigma);
}
The int value z is used as an indicator as to whether the event was right censored at y or whether it was an ordinary outcome.
Aki also mentioned that it's common to have a vector of censored outcomes, all censored at the same place.
Copied from original issue: stan-dev/stan#1153
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the existing weibull_log and weibull_ccdf_log implementations and their tests, then review how distribution functions are exposed in the Stan Math Library. Implement the requested right-censored Weibull behavior for the event indicator, and determine from nearby APIs how shared censoring points should be represented. Done means both ordinary and right-censored outcomes have the expected log-probability behavior with coverage for the supported interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100