Helper function that combines objects of class cv_ammi
,
cv_ammif
or cv_blup
. It is useful when looking for a boxplot
containing the RMSPD values of those cross-validation procedures.
bind_cv(..., bind = "boot", sort = TRUE)
... | Input objects of class |
---|---|
bind | What data should be used? To plot the RMSPD, use 'boot'
(default). Use |
sort | Used to sort the RMSPD mean in ascending order. |
An object of class cv_ammif
. The results will depend on the
argument bind
. If bind = 'boot'
then the RMSPD of all models
in ...
will be bind to a unique data frame. If bind = 'means'
then the RMSPD mean of all models in ...
will be bind to an unique
data frame.
Tiago Olivoto tiagoolivoto@gmail.com
# \donttest{ library(metan) # Two examples with only 5 resampling procedures AMMI = cv_ammif(data_ge, resp = GY, gen = GEN, env = ENV, rep = REP, nboot = 5) BLUP = cv_blup(data_ge, resp = GY, gen = GEN, env = ENV, rep = REP, nboot = 5) bind_data = bind_cv(AMMI, BLUP) plot(bind_data)#> $RMSPD #> # A tibble: 11 x 6 #> MODEL mean sd se Q2.5 Q97.5 #> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 AMMI2 0.391 0.0288 0.0129 0.366 0.432 #> 2 AMMI3 0.409 0.0303 0.0135 0.374 0.446 #> 3 AMMI5 0.413 0.0301 0.0135 0.389 0.454 #> 4 BLUP_g_RCBD 0.418 0.0204 0.00911 0.398 0.442 #> 5 AMMI4 0.423 0.0229 0.0103 0.400 0.450 #> 6 AMMI1 0.427 0.0168 0.00751 0.413 0.452 #> 7 AMMIF 0.434 0.0250 0.0112 0.397 0.456 #> 8 AMMI6 0.435 0.0194 0.00869 0.423 0.465 #> 9 AMMI8 0.436 0.0204 0.00910 0.407 0.457 #> 10 AMMI0 0.440 0.0176 0.00788 0.418 0.459 #> 11 AMMI7 0.447 0.0251 0.0112 0.417 0.478 #> #> attr(,"class") #> [1] "cvalidation"# }