View source: R/04a_ms_flat_1tail.R
ms_flat_1tail | R Documentation |
fitdistcp
PackageApplies 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.
ms_flat_1tail(x)
x |
data vector |
The 10 models are:
exp
,
pareto_k2
,
halfnorm
,
lnorm
,
frechet_k1
,
weibull
,
gamma
,
invgamma
,
invgauss
and
gpd_k1
.
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
Stephen Jewson stephen.jewson@gmail.com
# because it's too slow for CRAN
set.seed(1)
nx=50
x=rlnorm(nx)
print(ms_flat_1tail(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.