File tree 1 file changed +8
-2
lines changed
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, ...) {
230
230
approximate_loo.vselsearch <- function (object ,
231
231
ndraws_pred = 400 ,
232
232
nclusters_pred = NULL ,
233
+ nterms_max = NULL ,
233
234
verbose = TRUE ,
234
235
penalty = NULL ,
235
236
nloo = NULL ,
@@ -238,7 +239,9 @@ approximate_loo.vselsearch <- function(object,
238
239
... ) {
239
240
refmodel <- object $ refmodel
240
241
family <- refmodel $ family
241
- nterms_max <- object $ control $ nterms_max
242
+ if (is.null(nterms_max )) {
243
+ nterms_max <- object $ object $ nterms_max
244
+ }
242
245
243
246
# # fetch the default arguments or replace them by the user defined values
244
247
args <- parse_args_varsel(
@@ -445,6 +448,7 @@ approximate_kfold.refmodel <- function(object, ...) {
445
448
approximate_kfold.vselsearch <- function (object ,
446
449
ndraws_pred = 400 ,
447
450
nclusters_pred = NULL ,
451
+ nterms_max = NULL ,
448
452
K = NULL ,
449
453
verbose = TRUE ,
450
454
penalty = NULL ,
@@ -454,7 +458,9 @@ approximate_kfold.vselsearch <- function(object,
454
458
... ) {
455
459
refmodel <- object $ refmodel
456
460
family <- refmodel $ family
457
- nterms_max <- object $ object $ nterms_max
461
+ if (is.null(nterms_max )) {
462
+ nterms_max <- object $ object $ nterms_max
463
+ }
458
464
459
465
solution_terms <- object $ solution_terms
460
466
p_sel <- object $ p_sel
You can’t perform that action at this time.
0 commit comments