Fix bug whereloo() withk_thresholdargument specified would error if the model formula was a string insteadof a formula object. (#454)
Fix bug whereloo() withk_thresholdargument specified would error for models fit withstan_polr(). (#450)
Fix bug wherestan_aov() would use the wrongsingular.ok logic. (#448)
Fix bug where contrasts info was dropped when subsetting themodel matrix instan_glm(). (#459)
Fix bug wherestan_glmer() would error ifprior_aux=NULL. (#482)
posterior_predict() andposterior_epred() don’t error withnewdata forintercept only models by allowing data frames with 0 columns andmultiple rows. (#492)
New vignette on AB testing. (#409)
stan_jm() gains an offset term for the longitudinalsubmodel. (#415,
Effective number of parameters are computed for K-fold CV notjust LOO CV. (#462)
stan_clogit() now allows outcome variable to be afactor. (#520)
stan_jm() is not available for 32bitWindows
Some improvements to prior distributions, as described in detailin the vignettePrior Distributions for rstanarm Models andbookRegression and Other Stories. These changes shouldn’tcause any existing code to error, but default priors have changed insome cases:
autoscale argument to functions likenormal(),student_t(), etc., now defaults toFALSE except when used by default priors (default priorsstill do autoscalinng). This makes it simpler to specify non-defaultpriors. (#432)kfold() forstan_gamm4()models that usedrandom argument (#435)posterior_predict() andposterior_linpred() when usingnewdata withfamily = mgcv::betar (#406, #407)singular.ok now rules out singular design matrices instan_lm() (#402)data is adata.table object (#434,New methodposterior_epred() returns the posteriordistribution of the conditional expectation, which is equivalent to (andmay eventually entirely replace) setting argumenttransform=TRUE withposterior_linpred().(#432)
Added convenience functionslogit() andinvlogit() that are just wrappers forqlogis()andplogis(). These were previously provided by thearm package. (#432)
src/Makevars{.win} now uses a more robust way to findStanHeaders
Fixed bug whereranef() andcoef()methods forglmer-style models printed the wrong output forcertain combinations of varying intercepts and slopes.
Fixed a bug whereposterior_predict() failed forstan_glmer() models estimated withfamily = mgcv::betar.
Fixed bug inbayes_R2() for bernoulli models.(Thanks to
loo_R2() can now be called on the same fitted modelobject multiple times with identical (not just up to rng noise) results.(Thanks to
New vignette on doing MRP using rstanarm. (Thanks to
4x speedup for most GLMs (stan_glm()) and GAMs(stan_gamm4() withoutrandom argument). Thiscomes from using Stan’s new compound_glm functions(normal_id_glm,bernoulli_logit_glm,poisson_log_glm,neg_binomial_2_log_glm) underthe hood whenever possible. (Thanks to
compare_models() is deprecated in favor ofloo_compare() to keep up with the loo package (loo::loo_compare())
Thekfold() method now has acoresargument and parallelizes by fold rather than by Markov chain (unlessotherwise specified), which should be much more efficient when manycores are available.
Forstan_glm() withalgorithm='optimizing', Pareto smoothed importance sampling(arxiv.org/abs/1507.02646,mc-stan.org/loo/reference/psis.html)is now used to diagnose and improve inference (seehttps://avehtari.github.io/RAOS-Examples/BigData/bigdata.html). Thisalso now means that we can use PSIS-LOO also whenalgorithm='optimizing'. (Thanks to
Forstan_glm() the"meanfield" and"fullrank" ADVI algorithms also include the PSISdiagnostics and adjustments, but so far we have not seen any examplewhere these would be better than optimzation or MCMC.
stan_clogit() now works even when there are no commonpredictorsprior.info() works better with models produced bystan_jm() andstan_mvmer()stan_glm() (only) gets amean_PPD argumentthat whenFALSE avoids drawing from the posteriorpredictive distribution in the Stan codeposterior_linpred() now works even if the model wasestimated withalgorithm = "optimizing"stan_jm() andstan_mvmer() now correctlyinclude the intercept in the longitudinal submodelCompatible withloo package version>= 2.0
QR = TRUE no longer ignores theautoscale argument and has better behavior whenautoscale = FALSE
posterior_linpred() now has a draws argument likeforposterior_predict()
Dynamic predictions are now supported inposterior_traj() forstan_jm models.
More options for K-fold CV, including manually specifying thefolds or using helper functions to create them for particular model/datacombinations.
Minor release for build fixes for Solaris and avoiding a testfailure
Lots of good stuff in this release.
stan_polr() andstan_lm() handle theK = 1 case betterThe prior_aux arguments now defaults to exponential rather thanCauchy. This should be a safer default.
The Stan programs do not drop any constants and should now besafe to use with thebridgesampling package
hs() andhs_plus() priors have newdefaults based on a new paper by Aki Vehtari and Juho Piironen
stan_gamm4() is now more closely based onmgcv::jagam(), which may affect some estimates but theoptions remain largely the same
Theproduct_normal() prior permitsdf = 1, which is a product of … one normal variate
The build system is more conventional now. It should require lessRAM to build from source but it is slower unless you utilize parallelmake and LTO
stan_jm() andstan_mvmer() contributedby Sam Brilleman
bayes_R2() method to calculate a quantity similar to\(R^2\)
stan_nlmer(), which is similar tolme4::nlmer but watch out for multimodal posteriordistributions
stan_clogit(), which is similar tosurvival::clogit but accepts lme4-style group-specificterms
Themgcv::betar family is supported for thelme4-like modeling functions, allowing for beta regressions withlme4-style group terms and / or smooth nonlinear functions ofpredictors
Fix tostan_glmer() Bernoulli models with multiplegroup-specific intercept terms that could result in draws from the wrongposterior distribution
Fix bug with contrasts instan_aov() (thanks toHenrik Singmann)
Fix bug withna.action instan_glmer()(thanks to Henrik Singmann)
Minor release with only changes to allow tests to pass on CRAN
Fix for intercept with identity or square root link functions forthe auxiliary parameter of a beta regression
Fix for special case where only the intercepts vary by group anda non-default prior is specified for their standard deviation
Fix for off-by-one error in some lme4-style models with multiplegrouping terms
New methodsloo_linpred(),loo_pit(),loo_predict(), andloo_predictive_interval()
Support for many more plotfuns inpp_check() thatare implemented in thebayesplot package
Option to compute latent residuals instan_polr()(Thanks to Nate Sanders)
The pairs plot now uses the ggplot2 package
VarCorr() could return duplicates in cases where astan_{g}lmer model used grouping factor level names withspaces
The pairs() function now works with group-specificparameters
Thestan_gamm4() function works better now
Fix a problem with factor levels after estimating a model viastan_lm()
New model-fitting function(s)stan_betareg() (andstan_betareg.fit()) that uses the same likelihoods as thosesupported by thebetareg() function in thebetareg package (Thanks to Imad Ali)
New choices for priors on coefficients:laplace(),lasso(),product_normal()
Thehs() andhs_plus() priors now havenewglobal_df andglobal_scalearguments
stan_{g}lmer() models that only have group-specificintercept shifts are considerably faster now
Models with Student t priors and low degrees of freedom (that arenot 1, 2, or 4) may work better now due to Cornish-Fishertransformations
Many functions for priors have gained anautoscaleargument that defaults toTRUE and indicates that rstanarmshould make internal changes to the prior based on the scales of thevariables so that they default priors are weakly informative
The newcompare_models() function does moreextensive checking that the models being compared arecompatible
prior_ops argument to various model fittingfunctions is deprecated and replaced by a theprior_auxargument for the prior on the auxiliary parameter of various GLM-likemodelsreloo() if data was not specifiedpp_validate() that was only introduced onGitHubUses the newbayesplot andrstantools R packages
The newprior_summary() function can be used tofigure out what priors were actually used
stan_gamm4() is better implemented, can be followedbyplot_nonlinear(),posterior_predict() (withnewdata), etc.
Hyperparameters (i.e. covariance matrices in general) for lme4style models are now returned byas.matrix() andas.data.frame()
pp_validate() can now be used if optimization orvariational Bayesian inference was used to estimate the originalmodel
Fix for bad bug inposterior_predict() when factorlabels have spaces in lme4-style models
Fix when weights are used in Poisson models
posterior_linpred() gains anXZ argumentto output the design matrixstan_biglm() function that somewhat supportsbiglm::biglm
as.array() method for stanreg objects
k_threshold argument toloo() to doPSIS-LOO+
kfold() for K-fold CV
Ability to use sparse X matrices (slowly) for many models ifmemory is an issue
posterior_predict() with newdata now works correctlyfor ordinal models
stan_lm() now works when intercept isomitted
stan_glmer.fit() no longer permit models withduplicative group-specific terms since they don’t make sense and areusually a mistake on the user’s part
posterior_predict() with lme4-style models no longerfails if there are spaces or colons in the levels of the groupingvariables
posterior_predict() with ordinal models outputs acharacter matrix now
pp_validate() function based on the BayesValidatepackage by Sam Cook
posterior_vs_prior() function to visualize theeffect of conditioning on the data
Works (again) with R versions back to 3.0.2 (untestedthough)
Fix problem with models that had group-specific coefficients,which were mislabled. Although the parameters were estimated correctly,users of previous versions of rstanarm should run such models again toobtain correct summaries and posterior predictions. Thanks to someonenamed Luke for pointing this problem out on stan-users.
Vignettes now view correctly on the CRAN webiste thanks to YihuiXie
Fix problem with models without intercepts thanks toPaul-Christian Buerkner
Fix problem with specifying binomial ‘size’ for posterior_predictusing newdata
Fix problem with lme4-style formulas that use the same groupingfactor multiple times
Fix conclusion in rstanarm vignette thanks to someone namedMichael
Group-specific design matrices are kept sparse throughout toreduce memory consumption
Thelog_lik() function now has anewdata argument
New vignette on hierarchical partial pooling
Initial CRAN release