
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@fullstax/kaplan-meier-estimator
Advanced tools
Kaplan-Meier-Estimator also known as the product limit estimator.
A JavaScript implementation of the Kaplan-Meier-Estimator also known as the product limit estimator.
npm install --save kaplan-meier-estimator
<script src="https://unpkg.com/kaplan-meier-estimator@latest/lib/kaplan-meier-estimator.umd.js">
See examples/node for an example implementation.
import { compute } from '@fullstax/kaplan-meier-estimator';
const timeToEvents = [1, 12, 22, 29, 31, β¦];
const events = [false, true, false, true, true, β¦];
const kmData = compute(timeToEvents, events);
console.table(kmData);
CommonJs is also supported:
const { compute } = require('@fullstax/kaplan-meier-estimator');
See examples/browser for an example implementation. To server this example jsu start d webserver in the root of this repository.
<script src="https://unpkg.com/@fullstax/kaplan-meier-estimator/lib/kaplan-meier-estimator.umd.js">
const timeToEvents = [1, 12, 22, 29, 31, β¦];
const events = [false, true, false, true, true, β¦];
const kmData = KME.compute((timeToEvents, events);
console.table(kmData);
βββββββββββ¬ββββββββ¬βββββββ¬ββββββββ
β (index) β rate β time β event β
βββββββββββΌββββββββΌβββββββΌββββββββ€
β 0 β 1 β 1 β false β
β 1 β 0.929 β 12 β true β
β 2 β 0.929 β 22 β false β
β 3 β 0.851 β 29 β true β
β 4 β 0.774 β 31 β true β
β β¦ β β¦ β β¦ β β¦ β
βββββββββββ΄ββββββββ΄βββββββ΄ββββββββ
| # | Time to Event | event | > | S(t) |
|---|---|---|---|---|
| 1 | 1 | false | 1 | |
| 2 | 12 | true | 0.93 | |
| 3 | 22 | false | 0.93 | |
| 4 | 29 | true | 0.85 | |
| 5 | 31 | true | 0.77 | |
| 6 | 36 | false | 0.77 | |
| 7 | 38 | false | 0.77 | |
| 8 | 50 | false | 0.77 | |
| 9 | 60 | false | 0.77 | |
| 10 | 61 | true | 0.64 | |
| 11 | 70 | true | 0.52 | |
| 12 | 88 | false | 0.52 | |
| 13 | 99 | false | 0.52 | |
| 14 | 110 | false | 0.52 | |
| 15 | 140 | false | 0.52 |
Licensed 2022 by fullstax GmbH & Co. KG under a MIT License.
FAQs
Kaplan-Meier-Estimator also known as the product limit estimator.
We found that @fullstax/kaplan-meier-estimator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.