ms_flat_1tail {fitdistcp} | R Documentation |
Illustration of Model Selection Among 10 One Tail Distributions from the fitdistcp
Package
Description
Applies model selection using AIC, WAIC1, WAIC2 and leave-one-out logscore
to the input data x
,
for 10 one tailed models in the fitdistcp
package
(although for the GPD, the logscore is NA for mathematical reasons).
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 may be further shifted so that the minimum value is slightly greater than 1.
Usage
ms_flat_1tail(x)
Arguments
x |
data vector |
Details
The 10 models are:
exp
,
pareto_k2
,
halfnorm
,
lnorm
,
frechet_k1
,
weibull
,
gamma
,
invgamma
,
invgauss
and
gpd_k1
.
Value
Plots QQ plots to the screen, for each of the models, and returns a data frame containing
MLE parameter values
AIC scores (times -0.5), AIC weights
WAIC1 scores, WAIC1 weights
WAIC2 scores, WAIC2 weights
logscores, logscore weights
maximum likelihood and calibrating prior means
maximum likelihood and calibrating prior standard deviations
Author(s)
Stephen Jewson stephen.jewson@gmail.com
Examples
# because it's too slow for CRAN
set.seed(1)
nx=50
x=rlnorm(nx)
print(ms_flat_1tail(x))