File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ approximate_loo.refmodel <- function(object, ...) {
230230approximate_loo.vselsearch <- function (object ,
231231 ndraws_pred = 400 ,
232232 nclusters_pred = NULL ,
233+ nterms_max = NULL ,
233234 verbose = TRUE ,
234235 penalty = NULL ,
235236 nloo = NULL ,
@@ -238,7 +239,9 @@ approximate_loo.vselsearch <- function(object,
238239 ... ) {
239240 refmodel <- object $ refmodel
240241 family <- refmodel $ family
241- nterms_max <- object $ control $ nterms_max
242+ if (is.null(nterms_max )) {
243+ nterms_max <- object $ object $ nterms_max
244+ }
242245
243246 # # fetch the default arguments or replace them by the user defined values
244247 args <- parse_args_varsel(
@@ -445,6 +448,7 @@ approximate_kfold.refmodel <- function(object, ...) {
445448approximate_kfold.vselsearch <- function (object ,
446449 ndraws_pred = 400 ,
447450 nclusters_pred = NULL ,
451+ nterms_max = NULL ,
448452 K = NULL ,
449453 verbose = TRUE ,
450454 penalty = NULL ,
@@ -454,7 +458,9 @@ approximate_kfold.vselsearch <- function(object,
454458 ... ) {
455459 refmodel <- object $ refmodel
456460 family <- refmodel $ family
457- nterms_max <- object $ object $ nterms_max
461+ if (is.null(nterms_max )) {
462+ nterms_max <- object $ object $ nterms_max
463+ }
458464
459465 solution_terms <- object $ solution_terms
460466 p_sel <- object $ p_sel
You can’t perform that action at this time.
0 commit comments