Releases: stan-dev/rstanarm
rstanarm v2.32.1
rstanarm v2.26.1
This release updates rstanarm to use the latest syntax supported by rstan.
What's Changed
- wells dataset wrong variable name by @storopoli in #552
- add logo to be displayed in r-universe by @avehtari in #569
- Fix CRAN NOTEs and failures by @andrjohns in #587
- Implement posterior::as_draws() for rstanarm objects by @jgabry in #596
- Array syntax by @bgoodri in #597
Full Changelog: v2.21.3...v2.26.1
rstanarm v2.21.3
Bug fixes
-
Fix bug where
loo()
withk_threshold
argument specified would error if the model formula was a string instead of a formula object. (#454) -
Fix bug where
loo()
withk_threshold
argument specified would error for
models fit withstan_polr()
. (#450) -
Fix bug where
stan_aov()
would use the wrongsingular.ok
logic. (#448) -
Fix bug where contrasts info was dropped when subsetting the model matrix in
stan_glm()
. (#459) -
Fix bug where
stan_glmer()
would error ifprior_aux=NULL
. (#482) -
posterior_predict()
andposterior_epred()
don't error withnewdata
for
intercept only models by allowing data frames with 0 columns and multiple rows. (#492)
New features
-
New vignette on AB testing. (#409)
-
stan_jm()
gains an offset term for the longitudinal submodel. (#415, @pamelanluna) -
Effective number of parameters are computed for K-fold CV not just LOO CV. (#462)
-
stan_clogit()
now allows outcome variable to be a factor. (#520)
rstanarm v2.21.1
rstanarm 2.21.1
- Compatible with rstan v2.21.1
- Consistent with new book Regression and Other Stories
Backwards incompatible changes
-
stan_jm()
is not available for 32bit Windows -
Some improvements to prior distributions, as described in detail in the vignette
Prior Distributions for rstanarm Models and book Regression and Other Stories.
These changes shouldn't cause any existing code to error, but default priors have
changed in some cases:- default prior on intercept is still Gaussian but the way the location and
scale are determined has been updated (#432) autoscale
argument to functions likenormal()
,student_t()
, etc.,
now defaults toFALSE
except when used by default priors (default
priors still do autoscalinng). This makes it simpler to specify non-default
priors. (#432)
- default prior on intercept is still Gaussian but the way the location and
Bug fixes
- Fixed error in
kfold()
forstan_gamm4()
models that usedrandom
argument (#435) - Fixed error in
posterior_predict()
andposterior_linpred()
when usingnewdata
with
family = mgcv::betar
(#406, #407) singular.ok
now rules out singular design matrices instan_lm()
(#402)- Fix a potential error when
data
is adata.table
object (#434, @danschrage)
New functions
-
New method
posterior_epred()
returns the posterior distribution of the
conditional expectation, which is equivalent to (and may eventually entirely
replace) setting argumenttransform=TRUE
withposterior_linpred()
. (#432) -
Added convenience functions
logit()
andinvlogit()
that are just wrappers
forqlogis()
andplogis()
. These were previously provided by thearm
package. (#432)
v2.19.2
rstanarm version 2.19.2 is now on CRAN. Binaries have been built so it should be possible to install via
install.packages("rstanarm")
Release notes are available on the rstanarm website at http://mc-stan.org/rstanarm/news/
v2.14.1
Bug fixes
VarCorr
could return duplicates in cases where astan_{g}lmer
model used grouping
factors with spaces. This is now fixed.- The
pairs
function now also allows with group-specific parameters - The
stan_gamm4
function works better now (see issues #136, #132) - Fix a problem with factor levels after estimating a model via
stan_lm
New features
- New model-fitting function
stan_betareg
(andstan_betareg.fit
) that uses the same likelihoods as those supported by thebetareg
function in the betareg package - New choices for priors on regression coefficients:
laplace
,lasso
,product_normal
- The
hs
andhs_plus
priors now have newglobal_df
andglobal_scale
arguments stan_{g}lmer
models that only have group-specific intercept shifts are considerably
faster now- Models with Student t priors and low degrees of freedom (that are not 1, 2, or 4) may work better now due to Cornish-Fisher transformations
- Many functions for priors (e.g.,
normal
,student_t
, etc.) have gained anautoscale
argument that defaults toTRUE
and indicates that rstanarm should make internal changes to the prior based on the scales of the variables. This doesn't change previous behavior, just replaces the former mechanism for controlling this (used to be thescaled
argument to the now deprecatedprior_options
function). - The new
compare_models
function is a wrapper forloo::compare
that does more extensive checking that the rstanarm models being compared are compatible - New
prior_aux
argument allow specifying priors for auxiliary parameters. Previously it was only possible to set the scale for the prior on auxiliary parameters (e.g., residual sd for Gaussian, shape for Gamma, etc.). With theprior_aux
argument it is now possible to useexponential
,normal
,student_t
, orcauchy
for auxiliary parameters.
Deprecated arguments
- The
prior_ops
argument to various model fitting functions is deprecated and theprior_options
function used to specify theprior_ops
argument is also depredated. The functionality ofprior_options
has been replaced by theautoscale
argument to the functions for setting priors as well as theprior_aux
argument for for the prior on the auxiliary parameter of various GLM-like models.