posterior
posterior copied to clipboard
The posterior R package
I made a notebook about the Pareto diagnostics https://users.aalto.fi/~ave/casestudies/Pareto/pareto_diagnostics.html I can turn this to a vignette, but looking for a feedback first
The `.args` argument in summarise draws is passed to all summary functions as additional arguments. This fails if the summary function does not handle `...` or the keyword arguments specified...
`loo_pit` is currently in `rstantools` but needs implementation for discrete variables, and should probably be moved to `posterior`. `pit` isn't currently available, but is used, for example, by `bayesplot`, where...
I suppose there is an implicit expectation that all chains are the same length, but different lengths can occur when doing filtering with e.g. dplyr. I think the recommended workflow...
``` > pareto_khat(c(1e-4,rep(1,999))) Error in if (ndraws_tail > S/2) { : missing value where TRUE/FALSE needed > pareto_khat(c(1e-4,rep(1,999)), tail='right') Error in seq.default(S - ndraws_tail + 1, S) : 'from' must...
closes #317 #### Summary `repair_variable_names` converts names using periods (`theta.1.1`) to square brackets (`theta[1,1]) #### Copyright and Licensing By submitting this pull request, the copyright holder is agreeing to license...
#### Summary This is a draft PR to support complex numbers in draws and rvar data types. It closes #319. The main changes, plus some points of conversation: - Adjust...
After seeing @WardBrian's comment here: https://github.com/stan-dev/posterior/issues/317#issuecomment-1817035410 it occurred to me to check our support for complex numbers. It appears none of the existing formats support them. Support for converting complex...
This allows you to translate from the names Stan uses (like `theta.1`) to those Posterior wants (`theta[1]`). This function exists (privately) in cmdstanr, and is currently very simple: ```R repair_variable_names
It would be really great if posterior had a capacity to have reduced the standard errors associated with the expectations it can produce (eg mean, var and sd). Recent work...