stan-dev / projpred

Projection predictive variable selection
https://mc-stan.org/projpred/
Other
110 stars 25 forks source link

Don't warn about slightly large khats #490

Closed avehtari closed 3 months ago

avehtari commented 9 months ago

See https://github.com/stan-dev/loo/issues/234. If the default refit_prj=TRUE and ndraws_pred=400 are used, then the khat threshold would be 0.62

fweber144 commented 6 months ago

I haven't managed to work further on this yet, but in case anyone else is interested: Originally, I thought about copying lines https://github.com/stan-dev/loo/blob/006e25489a178a88bbe18e70914533804f2a051a/R/diagnostics.R#L427-L443 over to projpred (I wanted to avoid calling loo:::ps_khat_threshold() in projpred as this is an unexported function), but @avehtari pointed me to the posterior package which should have a well-tested and exported alternative function. So we could use that exported posterior function.