Learn R Programming

spect

An R package, short for survival probability ensemble classification tool, providing a simple, transparent, flexible interface for generating survival predictive models using binary classifiers with the option of using stacked ensemble modeling.

Copy Link

Version

Install

install.packages('spect')

Monthly Downloads

111

Version

1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Stephen Abrams

Last Published

April 8th, 2025

Functions in spect (1.0)

plot_survival_curve

Plots a sample of individual survival curves from the test data set.
spect_train

Generates a trained caret model using the given primary binary classification. Optionally generates a stacked ensemble model if a list of base learners is supplied.
spect_predict

Generates predictions for each individual at each interval defined by the `train_result` parameter. The interval-level predictions can be combined to generate surivival curves for an individual.
create_person_period_data

Generates person-period data for any data set, given the bounds defined by the training set.
create_training_data

Generates modeling data from a person-period data set.
plot_km

Plots a series of population Kaplan-Meier curves for different thresholds for both the test predictions and the ground truth
evaluate_model

Generates evaluation metrics, include time-dependent TPR and FPR rates as well as AUC
plot_synthetic_data

Simple visualization of synthetic subscription data.
create_synthetic_data

Generates a survival data set for synthetic streaming service subscription data. The survival event in this case is a cancellation of the subscription. It is given as a function of household income and average number of hours watched in the prior month. Users can adjust the level of censoring and variance in the data with the supplied parameters or simply call with no parameters for a default distribution of data.
generate_bounds

Generates the intervals based on the survival times in the supplied data set using the quantile function.