posterior 1.7.0
Enhancements
- Extend and export several functions related to the generalized Pareto distribution for use in other packages. (#408)
- Support Pareto PIT functionality via
pareto_pit. (#435) - Allow more warnings to be turned off via option
posterior.warn_on_merge_chains. - Improve documentation in many places.
- Improve tests by checking for edge cases.
posterior 1.6.1
CRAN release: 2025-02-27
Enhancements
- Convert lists of matrices to
draws_arrayobjects. - Improve the documentation in various places.
- Implement
pit()for draws and rvar objects. LOO-PIT can be computed usingweights.
posterior 1.6.0
CRAN release: 2024-07-03
Enhancements
- Add
excludeoption tosubset_draws(), which can be used to exclude the matched selection. - Add
are_log_weightsoption topareto_smooth(), which is necessary for correct Pareto smoothing computation if the input vector consists of log weights. - Add
pareto_smoothoption toweight_draws(), to Pareto smooth weights before adding to a draws object. - Add individual Pareto diagnostic functions (
pareto_khat(),pareto_khat_threshold(),pareto_min_ss(),pareto_convergence_rate()) -
thin_draws()now automatically thins draws based on ESS by default, and non-integer thinning is possible. - Matrix multiplication of
rvars can now be done with the base matrix multiplication operator (%*%) instead of%**%in R >= 4.3. -
variables(),variables<-(),set_variables(), andnvariables()now support awith_indicesargument, which determines whether variable names are retrieved/set with ("x[1]","x[2]"…) or without ("x") indices (#208). - Add
extract_variable_array()function to extract variables with indices into arrays of iterations x chains x any remaining dimensions (#340). - For types that support
factorvariables (draws_df,draws_list, anddraws_rvars),extract_variable()andextract_variable_matrix()can now returnfactors.
posterior 1.5.0
CRAN release: 2023-10-31
Enhancements
- Added support for nested-Rhat via
rhat_nested(#256) - Added support for indexing draws in
rvars usingrvars (#282):-
x[i]orx[i] <- ywhereiis a scalar logicalrvarslices (or updates)xby its draws. Thus, ify <- x[i], thenyis the same shape asxbut withsum(i)draws. -
x[[i]]orx[[i]] <- ywhereiis a scalar numeric rvar slices (or updates)xby selecting theith element within each corresponding draw. Thus, ify <- x[[i]], thenyis anrvarof length 1.
-
- Added
rvar_ifelse(), which is a variant ofifelse()that accepts (and returns)rvars (#282). - Array broadcasting for
rvars has been made faster.
Bug Fixes
- Ensure
rfun()works with primitive functions (#290) and dots arguments (#291). - Provide implementations of
vctrs::vec_proxy_equal(),vctrs::vec_proxy_compare(), andvctrs::vec_proxy_order(). - Minor future-proofing of
cbind(<rvar>),rbind(<rvar>), andchol(<rvar>)for R 4.4 (#304). - Ensure that
bind_draws(<draws_rvars>)regenerates draw ids when binding along chains or draws; this also fixes a bug insplit_chains(<draws_rvars>)(#300).
posterior 1.4.1
CRAN release: 2023-03-14
Bug Fixes
- Delay applying
tibble::num()formatting to output fromsummarise_draws()untilprint()is called so that summary output can be easily converted to a vanilla data frame (#275).
posterior 1.4.0
CRAN release: 2023-02-22
Enhancements
- Added new
rvar_factor()andrvar_ordered()subtypes ofrvar()that work analogously tofactor()andordered()(#149). See the new section onrvar_factors invignette("rvar"). - The
draws_df(),draws_list(), anddraws_rvars()formats now support discrete variables stored asfactors/ordereds (orrvar_factors /rvar_ordereds). If converted to formats that do not support discrete variables with named levels (draws_matrix()anddraws_array()), factor-like variables are converted tonumerics. - Made
match()and%in%generic and added support forrvars to both functions. - Added
modal_category(),entropy(), anddissent()functions for summarizing discrete draws. - Allow lists of draws objects to be passed as the first argument to
bind_draws()(#253). - Improving formatting of
summarise_drawsoutput viatibble::num. -
print.rvar()andformat.rvar()now default to a smaller number of significant digits in more cases, including when printing in data frames. This is controlled by the new"posterior.digits"option (seehelp("posterior-package")). - Implemented faster
vec_proxy.rvar()andvec_restore.rvar(), improving performance ofrvars intibbles (and elsewherevctrsis used).
Bug Fixes
- Ensure that
as_draws_rvars()preserves dimensions of length-1 arrays (#265). - Fix some minor compatibility issues with
rvar,vctrs,dplyr, andggplot2(#267, #269).
posterior 1.3.0
CRAN release: 2022-08-15
Enhancements
- Implement
for_each_draw(x, expr), which executesexpronce for each draw ofx, exposing variables inxas arrays of the shape implied by the indices in their names (#224). - Implement
subset_draws(),thin_draws(), andresample_draws()forrvars (#225). - Allow
weightsto be optional inresample_draws()(#225). - Add an implementation of
drop()forrvars. - Speed up subsetting of
draws_listobjects. (#229, #250)
Bug Fixes
- Support remaining modes of
diag()forrvars (#246). - Better parsing for named indices in
as_draws_rvars(), including nested use of[, likex[y[1],2](#243). - Allow 0-length
rvars withndraws() > 1(#242). - Ensure 0-length
rvars can be cast todrawsformats (#242). - Don’t treat length-1
rvars with more than 1 dimension as scalars when casting to other formats (#248).
posterior 1.2.2
CRAN release: 2022-06-09
Enhancements
- Improve the
mcse_sdfunction to not make a normality assumption. (#232)
posterior 1.2.1
CRAN release: 2022-03-07
Bug Fixes
- Correctly transform lists of data.frames into
draws_listobjects. - Correctly drop variables on assigning
NULLinmutate_variables. (#222)
posterior 1.2.0
CRAN release: 2022-01-05
Enhancements
- support casting to/from
rvaranddistributional::dist_sample(#109)
Bug Fixes
- fix hidden variables in
bind_draws.draws_dfwhen binding more than two objects thanks to Jouni Helske (#204) - fix output of
pillar::glimpse()when used on a data frame containingrvars (#210) - drop
"draws"and"draws_df"classes fromdraws_dfobjects if meta data columns are removed by adplyroperation (#202) - fix output of
print.draws_df()on objects with unrepaired draws (#217) - ensure
variance()works properly withsummarise_draws()(#219)
posterior 1.1.0
CRAN release: 2021-09-09
Bug Fixes
- ensure that
as_draws_rvars()works on lists of lists (#192) - fix some vector recycling issues with
rvar_rng(#195) - ensure that
subset_draws()respects input variable order, thanks to Karl Dunkle Werner and Alexey Stukalov (#188)
Other Changes
- No longer check for constant-per-chain input in effective sample size diagnostics as this is overly conservative especially for
ess_tail. (#198)
posterior 1.0.1
CRAN release: 2021-07-14
- ensure that all unit tests pass on all CRAN environments
- fix a problem that sometimes lead to
rvars being unnecessarily slow (#179)