knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README_figs/README-",
  out.width = "100%"
)

NOTE: This is a package created for experimental purposes, for the second edition of R Packages. But this can be useful for drawing various Q-Q plots to eventually inference which distribution is the best for the observed survival data.

survivalplotqq

The goal of survivalplotqq is to draw Q-Q plots with 8 different distribution for the observed survival data. (Complete cases only) This can be very helpful to find exact distribution for the observed data. Weibull, Log-Normal, Gompertz, Gumbel, Normal, Laplace, Pareto and Exponential distribution are used as candidate distributions.

Installation

devtools::install_github("givitallugot/survivalplotqq")

Example

This is a basic example which shows you how to draw survival Q-Q plot:

library(survivalplotqq)

loco$lnmiles <- log(loco$miles)
data <- loco[loco$tag == 1,] # Use only complete cases
colnames(data) <- c('x', 'tag', 'lnx')

plotqq.survival(data)


givitallugot/survivalplotqq documentation built on Dec. 20, 2021, 11:44 a.m.