Giter Club home page Giter Club logo

survobj's Introduction

Introduction to the survobj Package

by John Aponte

Introduction

This package defines a set of classes that encapsulate survival distributions

The objects of the class SURVIVAL encapsulate distributions of survival times. Each class has its own set of parameters but once the SURVIVAL object is defined, they have access to the same functions to calculate:

  • survival time function: sfx(),

  • hazard time function: hfx(),

  • cumulative hazard function: Cum_Hfx()

  • the inverse of the cumulative hazard function: invCum_Hfx().

  • generate random survival times: rsurv()

  • generate random survival times under proportional hazard ratio: rsurvhr().

  • generate random survival times under accelerated failure : rsuvrvaft()

  • generate random survival times under accelerate hazard: rsurvah()

There are several functions to plot the distributions

  • generic S3: plot.SURVIVAL()

  • plot_survival(): to plot the functions

  • ggplot_survival_random(): to ggplot random draws from the distribution

  • ggplot_survival_hr(): to ggplot random draws from the distribution using hazard ratio

  • ggplot_survival_aft(): to ggplot random draws from the distribution using accelerated time failure

  • ggplot_survival_ah(): to ggplot random draws from the distribution using accelerated hazard

  • compare_survival(): to graphically compare the functions of two SURVIVAL objects

Distributions

The current factories are implemented:

  • s_exponential(): for Exponential distributions

  • s_weibull(): for Weibull distributions

  • s_gompertz(): for Gompertz distributions

  • s_piecewise(): for Piecewise exponential distributions

  • s_loglogistic(): for Log Logistic distributions

  • s_lognormal(): for Log Normal distributions

See the vignettes for examples on the use on simulation of survival data.

Installation

To install the development version of this package from github use:

devtools::install_github("johnaponte/survobj", build_manual = T, build_vignettes = T)

For more information:

https://johnaponte.github.io/survobj/

survobj website

survobj's People

Contributors

johnaponte avatar

Stargazers

timelyportfolio avatar

Watchers

timelyportfolio avatar  avatar

survobj's Issues

Release survobj 1.0

First release:

Prepare for release:

  • git pull
  • usethis::use_github_links()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('major')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

Release survobj 2.0.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('major')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Finish blog post
  • Tweet

Release survobj 3.1.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Finish & publish blog post
  • Add link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Tweet

Release survobj 3.1.1

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.