Selection from table of PICKMDL criteria
crit_selection.Rd
Selection from table of PICKMDL criteria
Arguments
- crit_tab
Output from
crit_table
- pickmdl_method
A replacement for the original
PICKMDL
argument,method
. Possible values are"first"
(default) and"aic"
. The latter is an alternative to the original method,"best"
(not implemented).- star
Index to be selected when no model is ok according to criteria.
- when_star
Function to be called when no model is ok according to criteria. Supply
stop
to invoke error. SupplyNULL
to do nothing.
Examples
myseries <- pickmdl_data("myseries")
spec5 <- x13_spec_pickmdl(spec = "RSA3", transform.function = "Log")
sa5 <- x13_multi(myseries, spec = spec5)
tab <- crit_table(sa5)
crit_selection(tab)
#> [1] 3
crit_selection(tab[2:5, ])
#> [1] 2
crit_selection(tab[1:2, ]) # Warning
#> Warning: No model is ok according to criteria
#> [1] 1
crit_selection(tab[1:2, ], star = 2, when_star = message)
#> No model is ok according to criteria
#> [1] 2
crit_selection(tab[5:1, ])
#> [1] 1
crit_selection(tab[5:1, ], pickmdl_method = "aic")
#> [1] 3