ms_predictors_1tail {fitdistcp} | R Documentation |
Model Selection Among 5 Distributions with predictors from the fitdistcp
Package
Description
Applies model selection using AIC, WAIC1, WAIC2 and leave-one-out logscore
to the input data x,t
,
for 5 one tailed models with predictors in the fitdistcp
package.
The code is straightforward, and the point is to illustrate what is
possible using the model selection outputs from the fitdistcp
routines.
The input data may be automatically shifted so that the minimum value is positive.
For the Pareto, the data is so that the minimum value is slightly greater than 1.
Usage
ms_predictors_1tail(x, t)
Arguments
x |
data vector |
t |
predictor vector |
Details
The 5 models are:
exp_p1
,
pareto_p1k2
,
lnorm_p1
,
frechet_p2k1
,
weibull_p2
.
Value
Plots QQ plots to the screen, for each of the 5 models, and returns a data frame containing
AIC scores, AIC weights
WAIC1 scores, WAIC1 weights
WAIC2 scores, WAIC2 weights
logscores and logscore weights
Author(s)
Stephen Jewson stephen.jewson@gmail.com
Examples
# because it's too slow for CRAN
set.seed(2)
nx=100
predictor=c(1:nx)/nx
x=rlnorm(nx,meanlog=predictor,sdlog=0.1)
print(ms_predictors_1tail(x,predictor))