stan-dev / posterior

The posterior R package
https://mc-stan.org/posterior/
Other
167 stars 24 forks source link

pareto_smooth returning diagnostics by default is not optimal #325

Closed n-kall closed 10 months ago

n-kall commented 1 year ago

Currently pareto_smooth returns by default a list object of smoothed input and diagnostics. If return_k = FALSE, it only returns a numeric of smoothed values.

The function is usually used to smooth some draws and then use them for something else (perhaps in a series of pipes), and it seems unnecessary to always add return_k = FALSE to every call.

The default should probably be changed to return just the smoothed x (i.e. return_k = FALSE), and provide a message if the k-hat is high.

I can make a PR for this change.

paul-buerkner commented 1 year ago

Yes, I think that's a good idea! Please go ahead and make the PR