View source: R/04c_ms_predictors_2tail.R
ms_predictors_2tail | R Documentation |
fitdistcp
PackageApplies model selection using AIC, WAIC1, WAIC2 and leave-one-out logscore
to the input data x,t
,
for 6 two tail models with predictors in the fitdistcp
packages
(although for the GEV, 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.
GEVD is temperamental in that it doesn't work if the shape parameter is extreme.
ms_predictors_2tail(x, t)
x |
data vector |
t |
predictor vector |
The 11 models are:
norm_p1
,
gumbel_p1
,
logis_p1
,
lst_k3_p1
,
cauchy_p1
and
gev_p1
.
Plots QQ plots to the screen, for each of the 6 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=rnorm(nx,mean=predictor,sd=1)
print(ms_predictors_2tail(x,predictor))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.