Skip to content

Commit

Permalink
Omit argument nloo because subsampled LOO CV is still
Browse files Browse the repository at this point in the history
experimental in projpred (see stan-dev/projpred#94). Setting `nloo = n` should not change results compared to omitting argument `nloo`, but I guess it's better not to point to an experimental feature where not needed.
  • Loading branch information
fweber144 committed May 10, 2022
1 parent ad0e10c commit 45039b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bodyfat.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fat proportion, and will not subject these two to variable
selection.'' We subject all variables to selection.
```{r, results='hide'}
fitrhs_cvvs <- cv_varsel(fitrhs, method = 'forward', cv_method = 'loo',
nloo = n, verbose = FALSE)
verbose = FALSE)
```

And the estimated predictive performance of smaller models compared to the full model.
Expand Down Expand Up @@ -469,7 +469,7 @@ hs_prior <- hs(global_scale=tau0)
fitrhs2 <- stan_glm(formula2, data = dfr, prior = hs_prior, QR = TRUE,
seed=SEED, refresh=0)
fitrhs2_cvvs <- cv_varsel(fitrhs2, method = 'forward', cv_method = 'loo',
nloo=n, verbose = FALSE)
verbose = FALSE)
nsel2 <- suggest_size(fitrhs2_cvvs, alpha=0.1)
vsel2 <- solution_terms(fitrhs2_cvvs)[1:nsel2]
loormse_full2 <- sqrt(mean((df$siri-fitrhs2_cvvs$summaries$ref$mu)^2))
Expand Down

0 comments on commit 45039b1

Please sign in to comment.