Releases: stan-dev/posterior
Releases · stan-dev/posterior
posterior 1.6.0
Enhancements
- Add
exclude
option tosubset_draws()
, which can be used to exclude
the matched selection. - Add
are_log_weights
option topareto_smooth()
, which is necessary
for correct Pareto smoothing computation if the input vector
consists of log weights. - Add
pareto_smooth
option 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
rvar
s can now be done with the base matrix
multiplication operator (%*%
) instead of%**%
in R >= 4.3. variables()
,variables<-()
,set_variables()
, andnvariables()
now
support awith_indices
argument, 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
factor
variables (draws_df
,draws_list
, and
draws_rvars
),extract_variable()
andextract_variable_matrix()
can
now returnfactors
.
posterior 1.5.0
Enhancements
- Added support for nested-Rhat via
rhat_nested
(#256) - Added support for indexing draws in
rvar
s usingrvar
s (#282):x[i]
orx[i] <- y
wherei
is a scalar logicalrvar
slices (or
updates)x
by its draws. Thus, ify <- x[i]
, theny
is the same
shape asx
but withsum(i)
draws.x[[i]]
orx[[i]] <- y
wherei
is a scalar numeric rvar slices (or
updates)x
by selecting thei
th element within each corresponding draw.
Thus, ify <- x[[i]]
, theny
is anrvar
of length 1.
- Added
rvar_ifelse()
, which is a variant ofifelse()
that accepts (and
returns)rvar
s (#282). - Array broadcasting for
rvar
s 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.0
Enhancements
- Added new
rvar_factor()
andrvar_ordered()
subtypes ofrvar()
that work
analogously tofactor()
andordered()
(#149). See the new section on
rvar_factor
s invignette("rvar")
. - The
draws_df()
,draws_list()
, anddraws_rvars()
formats now support
discrete variables stored asfactors
/ordered
s (orrvar_factor
s /
rvar_ordered
s). If converted to formats that do not support discrete
variables with named levels (draws_matrix()
anddraws_array()
),
factor-like variables are converted tonumeric
s. - Made
match()
and%in%
generic and added support forrvar
s 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_draws
output 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 (see
help("posterior-package")
).- Implemented faster
vec_proxy.rvar()
andvec_restore.rvar()
, improving
performance ofrvar
s intibble
s (and elsewherevctrs
is used).
Bug Fixes
posterior 1.2.0
Enhancements
- support casting to/from
rvar
anddistributional::dist_sample
(#109)
Bug Fixes
- fix hidden variables in
bind_draws.draws_df
when binding
more than two objects thanks to Jouni Helske (#204) - fix output of
pillar::glimpse()
when used on a data frame containing
rvar
s (#210) - drop
"draws"
and"draws_df"
classes fromdraws_df
objects if meta data
columns are removed by adplyr
operation (#202) - fix output of
print.draws_df()
on objects with unrepaired draws (#217) - ensure
variance()
works properly withsummarise_draws()
(#219)
v1.0.0 (initial CRAN release)
This is the initial CRAN release version.
v0.1.4 (rvar format added)
v0.1.0 (beta release)
All major features for the first CRAN release should be there already and the interfaces should be mostly stable. More details on the Stan discourse forums: https://discourse.mc-stan.org/t/beta-release-of-our-posterior-r-package/15949
v0.0.1 (alpha release)
More details on the Stan Forums: https://discourse.mc-stan.org/t/alpha-release-of-our-new-posterior-r-package/11864