rstanarm R package for Bayesian applied regression modeling
Full Changelog: https://github.com/stan-dev/rstanarm/compare/v2.26.1...v2.32.1
This release updates rstanarm to use the latest syntax supported by rstan.
Full Changelog: https://github.com/stan-dev/rstanarm/compare/v2.21.3...v2.26.1
Fix bug where loo()
with k_threshold
argument specified would error if the model formula was a string instead of a formula object. (#454)
Fix bug where loo()
with k_threshold
argument specified would error for
models fit with stan_polr()
. (#450)
Fix bug where stan_aov()
would use the wrong singular.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 if prior_aux=NULL
. (#482)
posterior_predict()
and posterior_epred()
don't error with newdata
for
intercept only models by allowing data frames with 0 columns and multiple rows. (#492)
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)
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:
autoscale
argument to functions like normal()
, student_t()
, etc.,
now defaults to FALSE
except when used by default priors (default
priors still do autoscalinng). This makes it simpler to specify non-default
priors. (#432)kfold()
for stan_gamm4()
models that used random
argument (#435)posterior_predict()
and posterior_linpred()
when using newdata
with
family = mgcv::betar
(#406, #407)singular.ok
now rules out singular design matrices in stan_lm()
(#402)data
is a data.table
object (#434, @danschrage)New method posterior_epred()
returns the posterior distribution of the
conditional expectation, which is equivalent to (and may eventually entirely
replace) setting argument transform=TRUE
with posterior_linpred()
. (#432)
Added convenience functions logit()
and invlogit()
that are just wrappers
for qlogis()
and plogis()
. These were previously provided by the arm
package. (#432)
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/
VarCorr
could return duplicates in cases where a stan_{g}lmer
model used grouping
factors with spaces. This is now fixed.pairs
function now also allows with group-specific parametersstan_gamm4
function works better now (see issues #136, #132)stan_lm
stan_betareg
(and stan_betareg.fit
) that uses the same likelihoods as those supported by the betareg
function in the betareg packagelaplace
, lasso
, product_normal
hs
and hs_plus
priors now have new global_df
and global_scale
argumentsstan_{g}lmer
models that only have group-specific intercept shifts are considerably
faster nownormal
, student_t
, etc.) have gained an autoscale
argument that defaults to TRUE
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 the scaled
argument to the now deprecated prior_options
function).compare_models
function is a wrapper for loo::compare
that does more extensive checking that the rstanarm models being compared are compatibleprior_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 the prior_aux
argument it is now possible to use exponential
, normal
, student_t
, or cauchy
for auxiliary parameters.prior_ops
argument to various model fitting functions is deprecated and the prior_options
function used to specify the prior_ops
argument is also depredated. The functionality of prior_options
has been replaced by the autoscale
argument to the functions for setting priors as well as the prior_aux
argument for for the prior on the auxiliary parameter of various GLM-like models.