You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have support of kaplan-meier curve, perhaps in the Plot.map family.
As the curve is basically a cumulative sum with some transformations, it shouldn't be too hard.
This code gives a pretty good approxmation:
constcaseLength=[{case_length: 1},{case_length: 11},{case_length: null}]Plot.plot({y: {transform: (d)=>100-d*100},marks: [Plot.ruleY([1]),// we want a rule at 0% but it will get flipped by the transformPlot.line(caseLength,Plot.normalizeY((arr)=>arr.length,Plot.mapY("cumsum",{x: "case_length",y: (d)=>(d.case_length===null ? 0 : 1),curve: "step-before"})))]})
If interested, I can work on something that extends Plot.map
The text was updated successfully, but these errors were encountered:
It would be great to have support of kaplan-meier curve, perhaps in the
Plot.map
family.As the curve is basically a cumulative sum with some transformations, it shouldn't be too hard.
This code gives a pretty good approxmation:
If interested, I can work on something that extends Plot.map
The text was updated successfully, but these errors were encountered: