View source: R/04c_ms_predictors_1tail.R
ms_predictors_1tail | R Documentation |
fitdistcp
PackageApplies 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.
ms_predictors_1tail(x, t)
x |
data vector |
t |
predictor vector |
The 5 models are:
exp_p1
,
pareto_p1k2
,
lnorm_p1
,
frechet_p2k1
,
weibull_p2
.
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
Stephen Jewson stephen.jewson@gmail.com
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.