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 data.
The goal of survivalplotqq is to draw Q-Q plots with 8 different distribution for the observed survival data (Complete cases should be used.) This can be very helpful to find exact distribution for the observed data. Weibull, Log-Normal, Gompertz, Gumbel, Normal, Laplace, Pareto, Exponential distributions are used as candidate distributions.
devtools::install_github("givitallugot/survivalplotqq")
This is a basic example which shows you how to solve a common problem:
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)
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'
#> `geom_smooth()` using formula 'y ~ x'