Skip to content

Releases: stan-dev/posterior

posterior 1.6.0

07 Oct 02:45
Compare
Choose a tag to compare

Enhancements

  • Add exclude option to subset_draws(), which can be used to exclude
    the matched selection.
  • Add are_log_weights option to pareto_smooth(), which is necessary
    for correct Pareto smoothing computation if the input vector
    consists of log weights.
  • Add pareto_smooth option to weight_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(), and nvariables() now
    support a with_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() and extract_variable_matrix() can
    now return factors.

posterior 1.5.0

31 Oct 07:28
Compare
Choose a tag to compare

Enhancements

  • Added support for nested-Rhat via rhat_nested (#256)
  • Added support for indexing draws in rvars using rvars (#282):
    • x[i] or x[i] <- y where i is a scalar logical rvar slices (or
      updates) x by its draws. Thus, if y <- x[i], then y is the same
      shape as x but with sum(i) draws.
    • x[[i]] or x[[i]] <- y where i is a scalar numeric rvar slices (or
      updates) x by selecting the ith element within each corresponding draw.
      Thus, if y <- x[[i]], then y is an rvar of length 1.
  • Added rvar_ifelse(), which is a variant of ifelse() 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(), and vctrs::vec_proxy_order().
  • Minor future-proofing of cbind(<rvar>), rbind(<rvar>), and chol(<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 in split_chains(<draws_rvars>) (#300).

posterior 1.4.0

21 Feb 13:51
Compare
Choose a tag to compare

Enhancements

  • Added new rvar_factor() and rvar_ordered() subtypes of rvar() that work
    analogously to factor() and ordered() (#149). See the new section on
    rvar_factors in vignette("rvar").
  • The draws_df(), draws_list(), and draws_rvars() formats now support
    discrete variables stored as factors / ordereds (or rvar_factors /
    rvar_ordereds). If converted to formats that do not support discrete
    variables with named levels (draws_matrix() and draws_array()),
    factor-like variables are converted to numerics.
  • Made match() and %in% generic and added support for rvars to both
    functions.
  • Added modal_category(), entropy(), and dissent() 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 via tibble::num.
  • print.rvar() and format.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() and vec_restore.rvar(), improving
    performance of rvars in tibbles (and elsewhere vctrs is used).

Bug Fixes

  • Ensure that as_draws_rvars() preserves dimensions of length-1 arrays (#265).
  • Fix some minor compatibility issues with rvar, vctrs, dplyr, and
    ggplot2 (#267, #269).

posterior 1.2.0

05 Jan 21:05
Compare
Choose a tag to compare

Enhancements

  • support casting to/from rvar and distributional::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
    rvars (#210)
  • drop "draws" and "draws_df" classes from draws_df objects if meta data
    columns are removed by a dplyr operation (#202)
  • fix output of print.draws_df() on objects with unrepaired draws (#217)
  • ensure variance() works properly with summarise_draws() (#219)

v1.0.0 (initial CRAN release)

14 Jul 10:35
b097153
Compare
Choose a tag to compare

This is the initial CRAN release version.

v0.1.4 (rvar format added)

26 Mar 14:18
Compare
Choose a tag to compare
Pre-release

This version adds support for the random variables (rvar) format, thanks to @mjskay (#106).

v0.1.0 (beta release)

11 Jun 19:59
d2eac48
Compare
Choose a tag to compare

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)

13 Nov 18:37
Compare
Choose a tag to compare