- Allow using the
bridge_sampler
method even if prior samples are drawn within the model. (#485)
- Define custom variables in all of Stan's program blocks
via function
stanvar
. (#459) - Change the scope of non-linear parameters to be global within univariate models. (#390)
- Allow to automatically group predictor values in Gaussian
processes specified via
gp
. This may lead to a considerable increase in sampling efficiency. (#300) - Compute LOO-adjusted R-squared using method
loo_R2
. - Compute non-linear predictors outside of a loop over
observations by means of argument
loop
inbrmsformula
. - Fit non-linear mixture models. (#456)
- Fit censored or truncated mixture models. (#469)
- Allow
horseshoe
andlasso
priors to be set on special population-level effects. - Allow vectors of length greater one to be passed to
set_prior
. - Conveniently save and load fitted model objects in
brm
via argumentfile
. (#472) - Display posterior probabilities in the output of
hypothesis
.
- Deprecate argument
stan_funs
inbrm
in favor of using thestanvars
argument for the specification of custom Stan functions. - Deprecate arguments
flist
and...
innlf
. - Deprecate argument
dpar
inlf
andnlf
.
- Allow custom families in mixture models thanks to Noam Ross. (#453)
- Ensure compatibility with mice version 3.0. (#455)
- Fix naming of correlation parameters of group-level terms with multiple subgroups thanks to Kristoffer Magnusson. (#457)
- Improve scaling of default priors in
lognormal
models (#460). - Fix multiple problems in the post-processing of categorical models.
- Fix validation of nested grouping factors in post-processing methods when passing new data thanks to Liam Kendall.
- Allow censoring and truncation in zero-inflated and hurdle models. (#430)
- Export zero-inflated and hurdle distribution functions.
- Improve sampling efficiency of the ordinal families
cumulative
,sratio
, andcratio
. (#433) - Allow to specify a single k-fold subset in method
kfold
. (#441)
- Fix a problem in
launch_shinystan
due to which the maximum treedepth was not correctly displayed thanks to Paul Galpern. (#431)
- Extend
cor_car
to support intrinsic CAR models in pairwise difference formulation thanks to the case study of Mitzi Morris. - Compute
loo
and related methods for non-factorizable normal models.
- Rename quantile columns in
posterior_summary
. This affects the output ofpredict
and related methods ifsummary = TRUE
. (#425) - Use hashes to check if models have the same response values when performing model comparisons. (#414)
- No longer set
pointwise
dynamically inloo
and related methods. (#416) - No longer show information criteria in the summary output.
- Simplify internal workflow to implement native response distributions. (#421)
- Allow
cor_car
in multivariate models with residual correlations thanks to Quentin Read. (#427) - Fix a problem in the Stan code generation of distributional
beta
models thanks to Hans van Calster. (#404) - Fix
launch_shinystan.brmsfit
so that all parameters are now shown correctly in the diagnose tab. (#340)
- Specify custom response distributions with function
custom_family
. (#381) - Model missing values and measurement error in responses using the
mi
addition term. (#27, #343) - Allow missing values in predictors using
mi
terms on the right-hand side of model formulas. (#27) - Model interactions between the special predictor terms
mo
,me
, andmi
. (#313) - Introduce methods
model_weights
andloo_model_weights
providing several options to compute model weights. (#268) - Introduce method
posterior_average
to extract posterior samples averaged across models. (#386) - Allow hyperparameters of group-level effects to vary over the levels of a
categorical covariate using argument
by
in functiongr
. (#365) - Allow predictions of measurement-error models with new data. (#335)
- Pass user-defined variables to Stan via
stanvar
. (#219, #357) - Allow ordinal families in mixture models. (#389)
- Model covariates in multi-membership structures that vary over the levels of
the grouping factor via
mmc
terms. (#353) - Fit shifted log-normal models via family
shifted_lognormal
. (#218) - Specify nested non-linear formulas.
- Introduce function
make_conditions
to ease preparation of conditions formarginal_effects
.
- Change the parameterization of
weibull
andexgaussian
models to be consistent with other model classes. Post-processing of related models fitted with earlier version ofbrms
is no longer possible. - Treat integer responses in
ordinal
models as directly indicating categories even if the lowest integer is not one. - Improve output of the
hypothesis
method thanks to the ideas of Matti Vuorre. (#362) - Always plot
by
variables as facets inmarginal_smooths
. - Deprecate the
cor_bsts
correlation structure.
- Allow the
:
operator to combine groups in multi-membership terms thanks to Gang Chen. - Avoid an unexpected error when calling
LOO
with argumentreloo = TRUE
thanks to Peter Konings. (#348) - Fix problems in
predict
when applied to categorical models thanks to Lydia Andreyevna Krasilnikova and Thomas Vladeck. (#336, #345) - Allow truncation in multivariate models with missing values thanks to Malte Lau Petersen. (#380)
- Force time points to be unique within groups in autocorrelation structures thanks to Ruben Arslan. (#363)
- Fix problems when post-processing multiple uncorrelated group-level terms of the same grouping factor thanks to Ivy Jansen. (#374)
- Fix a problem in the Stan code of multivariate
weibull
andfrechet
models thanks to the GitHub user philj1s. (#375) - Fix a rare error when post-processing
binomial
models thanks to the GitHub user SeanH94. (#382) - Keep attributes of variables when preparing the
model.frame
thanks to Daniel Luedecke. (#393)
- Fit models on multiple imputed
datasets via
brm_multiple
thanks to Ruben Arslan. (#27) - Combine multiple
brmsfit
objects via functioncombine_models
. - Compute model averaged posterior
predictions with method
pp_average
. (#319) - Add new argument
ordinal
tomarginal_effects
to generate special plots for ordinal models thanks to the idea of the GitHub user silberzwiebel. (#190) - Use informative inverse-gamma priors for length-scale parameters of Gaussian processes. (#275)
- Compute hypotheses for all levels of a
grouping factor at once using argument
scope
in methodhypothesis
. (#327) - Vectorize user-defined
Stan
functions exported viaexport_functions
using argumentvectorize
. - Allow predicting new data in models with ARMA autocorrelation structures.
- Correctly recover noise-free coefficients
through
me
terms thanks to Ruben Arslan. As a side effect, it is no longer possible to define priors on noise-freeXme
variables directly, but only on their hyper-parametersmeanme
andsdme
. - Fix problems in renaming parameters of the
cor_bsts
structure thanks to Joshua Edward Morten. (#312) - Fix some unexpected errors when predicting from ordinal models thanks to David Hervas and Florian Bader. (#306, #307, #331)
- Fix problems when estimating and predicting multivariate ordinal models thanks to David West. (#314)
- Fix various minor problems in autocorrelation structures thanks to David West. (#320)
- Export the helper functions
posterior_summary
andposterior_table
both being used to summarize posterior samples and predictions.
- Fix incorrect computation of intercepts
in
acat
andcratio
models thanks to Peter Phalen. (#302) - Fix
pointwise
computation ofLOO
andWAIC
in multivariate models with estimated residual correlation structure. - Fix problems in various S3 methods sometimes
requiring unused variables to be specified in
newdata
. - Fix naming of Stan models thanks to Hao Ran Lai.
This is the second major release of brms
. The main
new feature are generalized multivariate models, which now
support everything already possible in univariate models,
but with multiple response variables. Further, the internal
structure of the package has been improved considerably to be
easier to maintain and extend in the future.
In addition, most deprecated functionality and arguments have
been removed to provide a clean new start for the package.
Models fitted with brms
1.0 or higher should remain
fully compatible with brms
2.0.
- Add support for generalized multivariate models,
where each of the univariate models may have a different
family and autocorrelation structure.
Residual correlations can be estimated for multivariate
gaussian
andstudent
models. All features supported in univariate models are now also available in multivariate models. (#3) - Specify different formulas for different
categories in
categorical
models. - Add weakly informative default priors for the
parameter class
Intercept
to improve convergence of more complex distributional models. - Optionally display the MC standard error in the
summary
output. (#280) - Add argument
re.form
as an alias ofre_formula
to the methodsposterior_predict
,posterior_linpred
, andpredictive_error
for consistency with other packages making use of these methods. (#283)
- Refactor many parts of the package to make it more consistent and easier to extend.
- Show the link functions of all
distributional parameters in the
summary
output. (#277) - Reduce working memory requirements when
extracting posterior samples for use in
predict
and related methods thanks to Fanyi Zhang. (#224) - Remove deprecated aliases of functions and arguments from the package. (#278)
- No longer support certain prior specifications, which were previously labeled as deprecated.
- Remove the depreacted addition term
disp
from the package. - Remove old versions of methods
fixef
,ranef
,coef
, andVarCorr
. - No longer support models fitted with
brms
< 1.0, which used the multivariate'trait'
syntax orginally deprecated inbrms
1.0. - Make posterior sample extraction in the
summary
method cleaner and less error prone. - No longer fix the seed for random number generation
in
brm
to avoid unexpected behavior in simulation studies.
- Store
stan_funs
inbrmsfit
objects to allow usingupdate
on models with user-defined Stan functions thanks to Tom Wallis. (#288) - Fix problems in various post-processing methods
when applied to models with the reserved variable
intercept
in group-level terms thanks to the GitHub user ASKurz. (#279) - Fix an unexpected error in
predict
and related methods when settingsample_new_levels = "gaussian"
in models with only one group-level effect. Thanks to Timothy Mastny. (#286)
- Allow setting priors on noise-free
variables specified via function
me
. - Add arguments
Ksub
,exact_loo
andgroup
to methodkfold
for defining omitted subsets according to a grouping variable or factor. - Allow addition argument
se
inskew_normal
models.
- Ensure correct behavior of horseshoe and lasso priors in multivariate models thanks to Donald Williams.
- Allow using
identity
links on all parameters of thewiener
family thanks to Henrik Singmann. (#276) - Use reasonable dimnames in the output
of
fitted
when returning linear predictors of ordinal models thanks to the GitHub user atrolle. (#274) - Fix problems in
marginal_smooths
occuring for multi-membership models thanks to Hans Tierens.
- Rebuild monotonic effects from scratch to allow specifying interactions with other variables. (#239)
- Introduce methods
posterior_linpred
andposterior_interval
for consistency with other model fitting packages based onStan
. - Introduce function
theme_black
providing a blackggplot2
theme. - Specify special group-level effects within the same terms as ordinary group-level effects.
- Add argument
prob
tosummary
, which allows to control the width of the computed uncertainty intervals. (#259) - Add argument
newdata
to thekfold
method. - Add several arguments to the
plot
method ofmarginal_effects
to improve control over the appearences of the plots.
- Use the same noise-free variables for all model parts in measurement error models. (#257)
- Make names of local-level terms used
in the
cor_bsts
structure more informative. - Store the
autocor
argument withinbrmsformula
objects. - Store posterior and prior samples in separate
slots in the output of method
hypothesis
. - No longer change the default theme of
ggplot2
when attachingbrms
. (#256) - Make sure signs of estimates are not dropped
when rounding to zero in
summary.brmsfit
. (#263) - Refactor parts of
extract_draws
andlinear_predictor
to be more consistent with the rest of the package.
- Do not silence the
Stan
parser when callingbrm
to get informative error messages about invalid priors. - Fix problems with spaces in priors
passed to
set_prior
. - Handle non
data.frame
objects correctly inhypothesis.default
. - Fix a problem relating to the colour
of points displayed in
marginal_effects
.
- Perform model comparisons based on
marginal likelihoods using the methods
bridge_sampler
,bayes_factor
, andpost_prob
all powered by thebridgesampling
package. - Compute a Bayesian version of R-squared
with the
bayes_R2
method. - Specify non-linear models for all distributional parameters.
- Combine multiple model formulas using
the
+
operator and the helper functionslf
,nlf
, andset_nl
. - Combine multiple priors using the
+
operator. - Split the
nlpar
argument ofset_prior
into the three argumentsresp
,dpar
, andnlpar
to allow for more flexible prior specifications.
- Refactor parts of the package to prepare for the implementation of more flexible multivariate models in future updates.
- Keep all constants in the log-posterior
in order for
bridge_sampler
to be working correctly. - Reduce the amount of renaming done
within the
stanfit
object. - Rename argument
auxpar
offitted.brmsfit
todpar
. - Use the
launch_shinystan
generic provided by theshinystan
package. - Set
bayesplot::theme_default()
as the defaultggplot2
theme when attachingbrms
. - Include citations of the
brms
overview paper as published in the Journal of Statistical Software.
- Fix problems when calling
fitted
withhurdle_lognormal
models thanks to Meghna Krishnadas. - Fix problems when predicting
sigma
inasym_laplace
models thanks to Anna Josefine Sorensen.
- Fit conditional autoregressive (CAR) models
via function
cor_car
thanks to the case study of Max Joseph. - Fit spatial autoregressive (SAR) models
via function
cor_sar
. Currently works for familiesgaussian
andstudent
. - Implement skew normal models via family
skew_normal
. Thanks to Stephen Martin for suggestions on the parameterization. - Add method
reloo
to perform exact cross-validation for problematic observations andkfold
to perform k-fold cross-validation thanks to the Stan Team. - Regularize non-zero coefficients in the
horseshoe
prior thanks to Juho Piironen and Aki Vehtari. - Add argument
new_objects
to various post-processing methods to allow for passing of data objects, which cannot be passed vianewdata
. - Improve parallel execution flexibility
via the
future
package.
- Improve efficiency and stability of ARMA models.
- Throw an error when the intercept is removed in an ordinal model instead of silently adding it back again.
- Deprecate argument
threshold
inbrm
and instead recommend passingthreshold
directly to the ordinal family functions. - Throw an error instead of a message when invalid priors are passed.
- Change the default value of the
autocor
slot inbrmsfit
objects to an emptycor_brms
object. - Shorten
Stan
code by combining declarations and definitions where possible.
- Fix problems in
pp_check
when the variable specified in argumentx
has attributes thanks to Paul Galpern. - Fix problems when computing fitted values for truncated discrete models based on new data thanks to Nathan Doogan.
- Fix unexpected errors when passing models, which did not properly initiliaze, to various post-processing methods.
- Do not accidently drop the second
dimension of matrices in
summary.brmsfit
for models with only a single observation.
- Fit latent Gaussian processes of one
or more covariates via function
gp
specified in the model formula (#221). - Rework methods
fixef
,ranef
,coef
, andVarCorr
to be more flexible and consistent with other post-processing methods (#200). - Generalize method
hypothesis
to be applicable on all objects coercible to adata.frame
(#198). - Visualize predictions via spaghetti
plots using argument
spaghetti
inmarginal_effects
andmarginal_smooths
. - Introduce method
add_ic
to store and reuse information criteria in fitted model objects (#220). - Allow for negative weights in multi-membership grouping structures.
- Introduce an
as.array
method forbrmsfit
objects.
- Show output of \R code in HTML vignettes thanks to Ben Goodrich (#158).
- Resolve citations in PDF vignettes thanks to Thomas Kluth (#223).
- Improve sampling efficiency for
exgaussian
models thanks to Alex Forrence (#222). - Also transform data points when using argument
transform
inmarginal_effects
thanks to Markus Gesmann.
- Fix an unexpected error in
marginal_effects
occuring for some models with autocorrelation terms thanks to Markus Gesmann. - Fix multiple problems occuring for models with
thecor_bsts
structure thanks to Andrew Ellis.
- Implement zero-one-inflated beta models
via family
zero_one_inflated_beta
. - Allow for more link functions in zero-inflated and hurdle models.
- Ensure full compatibility with
bayesplot
version 1.2.0. - Deprecate addition argument
disp
.
- Fix problems when setting priors on coefficients of auxiliary parameters when also setting priors on the corresponding coefficients of the mean parameter. Thanks to Matti Vuorre for reporting this bug.
- Allow ordered factors to be used as grouping variables thanks to the GitHub user itissid.
- Fit finite mixture models using family
function
mixture
. - Introduce method
pp_mixture
to compute posterior probabilities of mixture component memberships thanks to a discussion with Stephen Martin. - Implement different ways to sample new levels
of grouping factors in
predict
and related methods through argumentsample_new_levels
. Thanks to Tom Wallis and Jonah Gabry for a detailed discussion about this feature. - Add methods
loo_predict
,loo_linpred
, andloo_predictive_interval
for computing LOO predictions thanks to Aki Vehtari and Jonah Gabry. - Allow using
offset
in formulas of non-linear and auxiliary parameters. - Allow sparse matrix multiplication in non-linear and distributional models.
- Allow using the
identity
link for all auxiliary parameters. - Introduce argument
negative_rt
inpredict
andposterior_predict
to distinquish responses on the upper and lower boundary inwiener
diffusion models thanks to Guido Biele. - Introduce method
control_params
to conveniently extract control parameters of the NUTS sampler. - Introduce argument
int_conditions
inmarginal_effects
for enhanced plotting of two-way interactions thanks to a discussion with Thomas Kluth. - Improve flexibility of the
conditions
argument ofmarginal_effects
. - Extend method
stanplot
to correctly handle some newmcmc_
plots of thebayesplot
package.
- Improve the
update
method to only recompile models when theStan
code changes. - Warn about divergent transitions when calling
summary
orprint
onbrmsfit
objects. - Warn about unused variables in argument
conditions
when callingmarginal_effects
. - Export and document several distribution functions that were previously kept internal.
- Fix problems with the inclusion of offsets occuring for more complicated formulas thanks to Christian Stock.
- Fix a bug that led to invalid Stan code when sampling from priors in intercept only models thanks to Tom Wallis.
- Correctly check for category specific group-level effects in non-ordinal models thanks to Wayne Folta.
- Fix problems in
pp_check
when specifying argumentnewdata
together with argumentsx
orgroup
. - Rename the last column in the output of
hypothesis
to"star"
in order to avoid problems with zero length column names thanks to the GitHub user puterleat. - Add a missing new line statement at the end
of the
summary
output thanks to Thomas Kluth.
- Allow
horseshoe
andlasso
priors to be applied on population-level effects of non-linear and auxiliary parameters. - Force recompiling
Stan
models inupdate.brmsfit
via argumentrecompile
.
- Avoid indexing of matrices in non-linear models to slightly improve sampling speed.
- Fix a severe problem (introduced in version 1.5.0),
when predicting
Beta
models thanks to Vivian Lam. - Fix problems when summarizing some models
fitted with older version of
brms
thanks to Vivian Lam. - Fix checks of argument
group
in methodpp_check
thanks to Thomas K. - Get arguments
subset
andnsamples
working correctly inmarginal_smooths
.
- Implement the generalized extreme value
distribution via family
gen_extreme_value
. - Improve flexibility of the
horseshoe
prior thanks to Juho Piironen. - Introduce auxiliary parameter
mu
as an alternative to specifying effects within theformula
argument in functionbrmsformula
. - Return fitted values of auxiliary parameters
via argument
auxpar
of methodfitted
. - Add vignette
"brms_multilevel"
, in which the advanced formula syntax ofbrms
is explained in detail using several examples.
- Refactor various parts of the package to ease implementation of mixture and multivariate models in future updates. This should not have any user visible effects.
- Save the version number of
rstan
in elementversion
ofbrmsfit
objects.
- Fix a rare error when predicting
von_mises
models thanks to John Kirwan.
- Fit quantile regression models via family
asym_laplace
(asymmetric Laplace distribution). - Specify non-linear models in a (hopefully) more
intuitive way using
brmsformula
. - Fix auxiliary parameters to certain values
through
brmsformula
. - Allow
family
to be specified inbrmsformula
. - Introduce family
frechet
for modelling strictly positive responses. - Allow truncation and censoring at the same time.
- Introduce function
prior_
allowing to specify priors using one-sided formulas orquote
. - Pass priors to
Stan
directly without performing any checks by settingcheck = FALSE
inset_prior
. - Introduce method
nsamples
to extract the number of posterior samples. - Export the main formula parsing function
parse_bf
. - Add more options to customize two-dimensional surface
plots created by
marginal_effects
ormarginal_smooths
.
- Change structure of
brmsformula
objects to be more reliable and easier to extend. - Make sure that parameter
nu
never falls below1
to reduce convergence problems when using familystudent
. - Deprecate argument
nonlinear
. - Deprecate family
geometric
. - Rename
cov_fixed
tocor_fixed
. - Make handling of addition terms more transparent by exporting and documenting related functions.
- Refactor helper functions of the
fitted
method to be easier to extend in the future. - Remove many units tests of internal functions and add tests of user-facing functions instead.
- Import some generics from
nlme
instead oflme4
to remove dependency on the latter one. - Do not apply
structure
toNULL
anymore to get rid of warnings in \R-devel.
- Fix problems when fitting smoothing terms
with factors as
by
variables thanks to Milani Chaloupka. - Fix a bug that could cause some monotonic
effects to be ignored in the
Stan
code thanks to the GitHub user bschneider. - Make sure that the data of models with
only a single observation are compatible with
the generated
Stan
code. - Handle argument
algorithm
correctly inupdate.brmsfit
. - Fix a bug sometimes causing an error in
marginal_effects
when using familywiener
thanks to Andrew Ellis. - Fix problems in
fitted
when applied tozero_inflated_beta
models thanks to Milani Chaloupka. - Fix minor problems related to the prediction of autocorrelated models.
- Fix a few minor bugs related to the backwards
compatibility of multivariate and related models
fitted with
brms
< 1.0.0.
- Introduce the auxiliary parameter
disc
('discrimination') to be used in ordinal models. By default it is not estimated but fixed to one. - Create
marginal_effects
plots of two-way interactions of variables that were not explicitely modeled as interacting.
- Move
rstan
to 'Imports' andRcpp
to 'Depends' in order to avoid loadingrstan
into the global environment automatically.
- Fix a bug leading to unexpected errors in some S3 methods when applied to ordinal models.
- Fit error-in-variables models
using function
me
in the model formulae. - Fit multi-membership models using function
mm
in grouping terms. - Add families
exgaussian
(exponentially modified Gaussian distribution) andwiener
(Wiener diffusion model distribution) specifically suited to handle for response times. - Add the
lasso
prior as an alternative to thehorseshoe
prior for sparse models. - Add the methods
log_posterior
,nuts_params
,rhat
, andneff_ratio
forbrmsfit
objects to conveniently access quantities used to diagnose sampling behavior. - Combine chains in method
as.mcmc
using argumentcombine_chains
. - Estimate the auxiliary parameter
sigma
in models with known standard errors of the response by setting argumentsigma
toTRUE
in addition functionse
. - Allow visualizing two-dimensional smooths
with the
marginal_smooths
method.
- Require argument
data
to be explicitely specified in all user facing functions. - Refactor the
stanplot
method to usebayesplot
on the backend. - Use the
bayesplot
theme as the default in all plotting functions. - Add the abbreviations
mo
andcs
to specify monotonic and category specific effects respectively. - Rename generated variables in the data.frames
returned by
marginal_effects
to avoid potential naming conflicts. - Deprecate argument
cluster
and use the nativecores
argument ofrstan
instead. - Remove argument
cluster_type
as it is no longer required to apply forking. - Remove the deprecated
partial
argument.
- Add the new family
hurdle_lognormal
specifically suited for zero-inflated continuous responses. - Introduce the
pp_check
method to perform various posterior predictive checks using thebayesplot
package. - Introduce the
marginal_smooths
method to better visualize smooth terms. - Allow varying the scale of global shrinkage
parameter of the
horseshoe
prior. - Add functions
prior
andprior_string
as aliases ofset_prior
, the former allowing to pass arguments without quotes""
using non-standard evaluation. - Introduce four new vignettes explaining how to fit non-linear models, distributional models, phylogenetic models, and monotonic effects respectively.
- Extend the
coef
method to better handle category specific group-level effects. - Introduce the
prior_summary
method forbrmsfit
objects to obtain a summary of prior distributions applied. - Sample from the prior of the original population-level
intercept when
sample_prior = TRUE
even in models with an internal temporary intercept used to improve sampling efficiency. - Introduce methods
posterior_predict
,predictive_error
andlog_lik
as (partial) aliases ofpredict
,residuals
, andlogLik
respectively.
- Improve computation of Bayes factors
in the
hypothesis
method to be less influenced by MCMC error. - Improve documentation of default priors.
- Refactor internal structure of some formula and prior evaluating functions. This should not have any user visible effects.
- Use the
bayesplot
package as the new backend ofplot.brmsfit
.
- Better mimic
mgcv
when parsing smooth terms to make sure all arguments are correctly handled. - Avoid an error occuring during the prediction of new data when grouping factors with only a single factor level were supplied thanks to Tom Wallis.
- Fix
marginal_effects
to consistently produce plots for all covariates in non-linear models thanks to David Auty. - Improve the
update
method to better recognize situations where recompliation of theStan
code is necessary thanks to Raphael P.H. - Allow to correctly
update
thesample_prior
argument to value"only"
. - Fix an unexpected error occuring in many S3 methods when the thinning rate is not a divisor of the total number of posterior samples thanks to Paul Zerr.
- Estimate monotonic group-level effects.
- Estimate category specific group-level effects.
- Allow
t2
smooth terms based on multiple covariates. - Estimate interval censored data via the
addition argument
cens
in the model formula. - Allow to compute
residuals
also based on predicted values instead of fitted values.
- Use the prefix
bcs
in parameter names of category specific effects and the prefixbm
in parameter names of monotonic effects (instead of the prefixb
) to simplify their identifaction. - Ensure full compatibility with
ggplot2
version 2.2.
- Fix a bug that could result in incorrect
threshold estimates for
cumulative
andsratio
models thanks to Peter Congdon. - Fix a bug that sometimes kept distributional
gamma
models from being compiled thanks to Tim Beechey. - Fix a bug causing an error in
predict
and related methods when two-level factors or logical variables were used as covariates in non-linear models thanks to Martin Schmettow. - Fix a bug causing an error when passing lists to additional arguments of smoothing functions thanks to Wayne Folta.
- Fix a bug causing an error in the
prior_samples
method for models with multiple group-level terms that refer to the same grouping factor thanks to Marco Tullio Liuzza. - Fix a bug sometimes causing an error when
calling
marginal_effects
for weighted models.
\subsection{MINOR CHANGES
- Center design matrices inside the Stan code
instead of inside
make_standata
. - Get rid of several warning messages occuring on CRAN.
This is one of the largest updates of brms
since its
initial release. In addition to many new features,
the multivariate 'trait'
syntax has been removed
from the package as it was confusing for users, required
much special case coding, and was hard to maintain.
See help(brmsformula)
for details of the formula
syntax applied in brms
.
- Allow estimating correlations between
group-level effects defined across multiple formulae
(e.g., in non-linear models) by specifying IDs in
each grouping term via an extended
lme4
syntax. - Implement distributional regression models allowing to fully predict auxiliary parameters of the response distribution. Among many other possibilities, this can be used to model heterogeneity of variances.
- Zero-inflated and hurdle models do not use
multivariate syntax anymore but instead have
special auxiliary parameters named
zi
andhu
defining zero-inflation / hurdle probabilities. - Implement the
von_mises
family to model circular responses. - Introduce the
brmsfamily
function for convenient specification offamily
objects. - Allow predictions of
t2
smoothing terms for new data. - Feature vectors as arguments for the addition
argument
trunc
in order to model varying truncation points.
- Remove the
cauchy
family after several months of deprecation. - Make sure that group-level parameter names are unambiguous by adding double underscores thanks to the idea of the GitHub user schmettow.
- The
predict
method now returns predicted probabilities instead of absolute frequencies of samples for ordinal and categorical models. - Compute the linear predictor in the model block of the Stan program instead of in the transformed parameters block. This avoids saving samples of unnecessary parameters to disk. Thanks goes to Rick Arrano for pointing me to this issue.
- Colour points in
marginal_effects
plots if sensible. - Set the default of the
robust
argument toTRUE
inmarginal_effects.brmsfit
.
- Fix a bug that could occur when predicting factorial response variables for new data. Only affects categorical and ordinal models.
- Fix a bug that could lead to duplicated variable names in the Stan code when sampling from priors in non-linear models thanks to Tom Wallis.
- Fix problems when trying to pointwise evaluate non-linear formulae in
logLik.brmsfit
thanks to Tom Wallis. - Ensure full compatibility of the
ranef
andcoef
methods with non-linear models. - Fix problems that occasionally occured when handling
dplyr
datasets thanks to the GitHub user Atan1988.
- Add support for generalized additive mixed models (GAMMs). Smoothing terms can
be specified using the
s
andt2
functions in the model formula. - Introduce
as.data.frame
andas.matrix
methods forbrmsfit
objects.
- The
gaussian("log")
family no longer implies a log-normal distribution, but a normal distribution with log-link to match the behavior ofglm
. The log-normal distribution can now be specified via familylognormal
. - Update syntax of
Stan
models to match the recommended syntax ofStan
2.10.
- The
ngrps
method should now always return the correct result for non-linear models. - Fix problems in
marginal_effects
for models using the reserved variableintercept
thanks to Frederik Aust. - Fix a bug in the
print
method ofbrmshypothesis
objects that could lead to duplicated and thus invalid row names. - Residual standard deviation parameters of multivariate models are again
correctly displayed in the output of the
summary
method. - Fix problems when using variational Bayes algorithms with
brms
while havingrstan
>= 2.10.0 installed thanks to the GitHub user cwerner87.
- Allow the '/' symbol in group-level terms in the
formula
argument to indicate nested grouping structures. - Allow to compute
WAIC
andLOO
based on the pointwise log-likelihood using argumentpointwise
to substantially reduce memory requirements.
- Add horizontal lines to the errorbars in
marginal_effects
plots for factors.
- Fix a bug that could lead to a cryptic error message when changing some parts
of the model
formula
using theupdate
method. - Fix a bug that could lead to an error when calling
marginal_effects
for predictors that were generated with thebase::scale
function thanks to Tom Wallis. - Allow interactions of numeric and categorical predictors in
marginal_effects
to be passed to theeffects
argument in any order. - Fix a bug that could lead to incorrect results of
predict
and related methods when called withnewdata
in models using thepoly
function thanks to Brock Ferguson. - Make sure that user-specified factor contrasts are always applied in multivariate models.
- Add support for
monotonic
effects allowing to use ordinal predictors without assuming their categories to be equidistant. - Apply multivariate formula syntax in categorical models to considerably increase modeling flexibility.
- Add the addition argument
disp
to define multiplicative factors on dispersion parameters. For linear models,disp
applies to the residual standard deviationsigma
so that it can be used to weight observations. - Treat the fixed effects design matrix as sparse by using the
sparse
argument ofbrm
. This can considerably reduce working memory requirements if the predictors contain many zeros. - Add the
cor_fixed
correlation structure to allow for fixed user-defined covariance matrices of the response variable. - Allow to pass self-defined
Stan
functions via argumentstan_funs
ofbrm
. - Add the
expose_functions
method allowing to expose self-definedStan
functions inR
. - Extend the functionality of the
update
method to allow all model parts to be updated. - Center the fixed effects design matrix also in multivariate models. This may lead to increased sampling speed in models with many predictors.
- Refactor
Stan
code and data generating functions to be more consistent and easier to extent. - Improve checks of user-define prior specifications.
- Warn about models that have not converged.
- Make sure that regression curves computed by the
marginal_effects
method are always smooth. - Allow to define category specific effects in ordinal models directly within
the
formula
argument.
- Fix problems in the generated
Stan
code when using very long non-linear model formulas thanks to Emmanuel Charpentier. - Fix a bug that prohibited to change priors on single standard deviation parameters in non-linear models thanks to Emmanuel Charpentier.
- Fix a bug that prohibited to use nested grouping factors in non-linear models thanks to Tom Wallis.
- Fix a bug in the linear predictor computation within
R
, occuring for ordinal models with multiple category specific effects. This could lead to incorrect outputs ofpredict
,fitted
, andlogLik
for these models. - Make sure that the global
"contrasts"
option is not used when post-processing a model.
- Implement generalized non-linear models, which can be specified with the help
of the
nonlinear
argument inbrm
. - Compute and plot marginal effects using the
marginal_effects
method thanks to the help of Ruben Arslan. - Implement zero-inflated beta models through family
zero_inflated_beta
thanks to the idea of Ali Roshan Ghias. - Allow to restrict domain of fixed effects and autocorrelation parameters using
new arguments
lb
andub
in functionset_prior
thanks to the idea of Joel Gombin. - Add an
as.mcmc
method for compatibility with thecoda
package. - Allow to call the
WAIC
,LOO
, andlogLik
methods with new data.
- Make sure that
brms
is fully compatible withloo
version 0.1.5. - Optionally define the intercept as an ordinary fixed effect to avoid the reparametrization via centering of the fixed effects design matrix.
- Do not compute the WAIC in
summary
by default anymore to reduce computation time of the method for larger models. - The
cauchy
family is now deprecated and will be removed soon as it often has convergence issues and not much practical application anyway. - Change the default settings of the number of chains and warmup samples to the
defaults of
rstan
(i.e.,chains = 4
andwarmup = iter / 2
). - Do not remove bad behaving chains anymore as they may point to general convergence problems that are dangerous to ignore.
- Improve flexibility of the
theme
argument in all plotting functions. - Only show the legend once per page, when computing trace and density plots
with the
plot
method. - Move code of self-defined
Stan
functions toinst/chunks
and incorporate them into the models usingrstan::stanc_builder
. Also, add unit tests for these functions.
- Fix problems when predicting with
newdata
for zero-inflated and hurdle models thanks to Ruben Arslan. - Fix problems when predicting with
newdata
if it is a subset of the data stored in abrmsfit
object thanks to Ruben Arslan. - Fix data preparation for multivariate models if some responses are
NA
thanks to Raphael Royaute. - Fix a bug in the
predict
method occurring for some multivariate models so that it now always returns the predictions of all response variables, not just the first one. - Fix a bug in the log-likelihood computation of
hurdle_poisson
andhurdle_negbinomial
models. This may lead to minor changes in the values obtained byWAIC
andLOO
for these models. - Fix some backwards compatibility issues of models fitted with version <= 0.5.0 thanks to Ulf Koether.
- Use variational inference algorithms as alternative to the NUTS sampler by
specifying argument
algorithm
in thebrm
function. - Implement beta regression models through family
Beta
. - Implement zero-inflated binomial models through family
zero_inflated_binomial
. - Implement multiplicative effects for family
bernoulli
to fit (among others) 2PL IRT models. - Generalize the
formula
argument for zero-inflated and hurdle models so that predictors can be included in only one of the two model parts thanks to the idea of Wade Blanchard. - Combine fixed and random effects estimates using the new
coef
method. - Call the
residuals
method withnewdata
thanks to the idea of Friederike Holz-Ebeling. - Allow new levels of random effects grouping factors in the
predict
,fitted
, andresiduals
methods using argumentallow_new_levels
. - Selectively exclude random effects in the
predict
,fitted
, andresiduals
methods using argumentre_formula
. - Add a
plot
method for objects returned by methodhypothesis
to visualize prior and posterior distributions of the hypotheses being tested.
- Improve evaluation of the response part of the
formula
argument to reliably allow terms with more than one variable (e.g.,y/x ~ 1
). - Improve sampling efficiency of models containing many fixed effects through centering the fixed effects design matrix thanks to Wayne Folta.
- Improve sampling efficiency of models containing uncorrelated random effects
specified by means of
(random || group)
terms informula
thanks to Ali Roshan Ghias. - Utilize user-defined functions in the
Stan
code of ordinal models to improve readability as well as sampling efficiency. - Make sure that model comparisons using
LOO
orWAIC
are only performed when models are based on the same responses. - Use some generic functions of the
lme4
package to avoid unnecessary function masking. This leads to a change in the argument order of methodVarCorr
. - Change the
ggplot
theme in theplot
method through argumenttheme
. - Remove the
n.
prefix in argumentsn.iter
,n.warmup
,n.thin
,n.chains
, andn.cluster
of thebrm
function. The old argument names remain usable as deprecated aliases. - Amend names of random effects parameters to simplify matching with their respective grouping factor levels.
- Fix a bug in the
hypothesis
method that could cause valid model parameters to be falsely reported as invalid. - Fix a bug in the
prior_samples
method that could cause prior samples of parameters of the same class to be artifically correlated. - Fix
Stan
code of linear models with moving-average effects and non-identity link functions so that they no longer contain code related solely to autoregressive effects. - Fix a bug in the evaluation of
formula
that could cause complicated random effects terms to be falsely treated as fixed effects. - Fix several bugs when calling the
fitted
andpredict
methods withnewdata
thanks to Ali Roshan Ghias.
- Add support for zero-inflated and hurdle models thanks to the idea of Scott Baldwin.
- Implement inverse gaussian models through family
inverse.gaussian
. - Allow to specify truncation boundaries of the response variable thanks to the idea of Maciej Beresewicz.
- Add support for autoregressive (AR) effects of residuals, which can be modeled
using the
cor_ar
andcor_arma
functions. - Stationary autoregressive-moving-average (ARMA) effects of order one can now also be fitted using special covariance matrices.
- Implement multivariate student-t models.
- Binomial and ordinal families now support the
cauchit
link function. - Allow family functions to be used in the
family
argument. - Easy access to various
rstan
plotting functions using thestanplot
method. - Implement horseshoe priors to model sparsity in fixed effects coefficients thanks to the idea of Josh Chang.
- Automatically scale default standard deviation priors so that they remain only weakly informative independent on the response scale.
- Report model weights computed by the
loo
package when comparing multiple fitted models.
- Separate the fixed effects Intercept from other fixed effects in the
Stan
code to slightly improve sampling efficiency. - Move autoregressive (AR) effects of the response from the
cor_ar
to thecor_arr
function as the result of implementing AR effects of residuals. - Improve checks on argument
newdata
used in thefitted
andpredict
method. - Method
standata
is now the only way to extract data that was passed toStan
from abrmsfit
object. - Slightly improve
Stan
code for models containing no random effects. - Change the default prior of the degrees of freedom of the
student
family togamma(2,0.1)
. - Improve readability of the output of method
VarCorr
. - Export the
make_stancode
function to give users direct access toStan
code generated bybrms
. - Rename the
brmdata
function tomake_standata
. The former remains usable as a deprecated alias. - Improve documenation to better explain differences in autoregressive effects across R packages.
- Fix a bug that could cause an unexpected error when the
predict
method was called withnewdata
. - Avoid side effects of the
rstan
compilation routines that could occasionally cause R to crash. - Make
brms
work correctly withloo
version 0.1.3 thanks to Mauricio Garnier Villarreal and Jonah Gabry. - Fix a bug that could cause WAIC and LOO estimates to be slightly incorrect for
gaussian
models withlog
link.
- Compute the Watanabe-Akaike information criterion (WAIC) and leave-one-out
cross-validation (LOO) using the
loo
package. - Provide an interface to
shinystan
with S3 methodlaunch_shiny
. - New functions
get_prior
andset_prior
to make prior specifications easier. - Log-likelihood values and posterior predictive samples can now be calculated within R after the model has been fitted.
- Make predictions based on new data using S3 method
predict
. - Allow for customized covariance structures of grouping factors with multiple random effects.
- New S3 methods
fitted
andresiduals
to compute fitted values and residuals, respectively.
- Arguments
WAIC
andpredict
are removed from thebrm
function, as they are no longer necessary. - New argument
cluster_type
in functionbrm
allowing to choose the cluster type created by the parallel package. - Remove chains that fail to initialize while sampling in parallel leaving the other chains untouched.
- Redesign trace and density plots to be faster and more stable.
- S3 method
VarCorr
now always returns covariance matrices regardless of whether correlations were estimated.
- Fix a bug in S3 method
hypothesis
related to the calculation of Bayes-factors for point hypotheses. - User-defined covariance matrices that are not strictly positive definite for numerical reasons should now be handled correctly.
- Fix problems when a factor is used as fixed effect and as random effects grouping variable at the same time thanks to Ulf Koether.
- Fix minor issues with internal parameter naming.
- Perform additional checking on user defined priors.
- Allow for sampling from all specified proper priors in the model.
- Compute Bayes-factors for point hypotheses in S3 method
hypothesis
.
- Fix a bug that could cause an error for models with multiple grouping factors thanks to Jonathan Williams.
- Fix a bug that could cause an error for weighted poisson and exponential models.
- Implement the Watanabe-Akaike Information Criterion (WAIC).
- Implement the
||
-syntax for random effects allowing for the estimation of random effects standard deviations without the estimation of correlations. - Allow to combine multiple grouping factors within one random effects argument
using the interaction symbol
:
. - Generalize S3 method
hypothesis
to be used with all parameter classes not just fixed effects. In addition, one-sided hypothesis testing is now possible. - Introduce new family
multigaussian
allowing for multivariate normal regression. - Introduce new family
bernoulli
for dichotomous response variables as a more efficient alternative to familiesbinomial
orcategorical
in this special case.
- Slightly change the internal structure of brms to reflect that
rstan
is finally on CRAN. - Thoroughly check validity of the response variable before the data is passed
to
Stan
. - Prohibit variable names containing double underscores
__
to avoid naming conflicts. - Allow function calls with several arguments (e.g.
poly(x,3)
) in the formula argument of functionbrm
. - Always center random effects estimates returned by S3 method
ranef
around zero. - Prevent the use of customized covariance matrices for grouping factors with multiple random effects for now.
- Remove any experimental
JAGS
code from the package.
- Fix a bug in S3 method
hypothesis
leading to an error when numbers with decimal places were used in the formulation of the hypotheses. - Fix a bug in S3 method
ranef
that caused an error for grouping factors with only one random effect. - Fix a bug that could cause the fixed intercept to be wrongly estimated in the presence of multiple random intercepts thanks to Jarrod Hadfield.
- Introduce new methods
parnames
andposterior_samples
for class 'brmsfit' to extract parameter names and posterior samples for given parameters, respectively. - Introduce new method
hypothesis
for classbrmsfit
allowing to test non-linear hypotheses concerning fixed effects. - Introduce new argument
addition
in function brm to get a more flexible approach in specifying additional information on the response variable (e.g., standard errors for meta-analysis). Alternatively, this information can also be passed to theformula
argument directly. - Introduce weighted and censored regressions through argument
addition
of function brm. - Introduce new argument
cov.ranef
in thebrm
function allowing for customized covariance structures of random effects thanks to the idea of Boby Mathew. - Introduce new argument
autocor
in function brm allowing for autocorrelation of the response variable. - Introduce new functions
cor.ar
,cor.ma
, andcor.arma
, to be used with argumentautocor
for modeling autoregressive, moving-average, and autoregressive-moving-average models.
- Amend parametrization of random effects to increase efficiency of the sampling algorithms.
- Improve vectorization of sampling statements.
- Fix a bug that could cause an error when fitting poisson models while
predict = TRUE
. - Fix a bug that caused an error when sampling only one chain while
silent = TRUE
.
- New S3 class
brmsfit
to be returned by thebrm
function. - New methods for class
brmsfit
:summary
,print
,plot
,predict
,fixef
,ranef
,VarCorr
,nobs
,ngrps
, andformula
. - Introduce new argument
silent
in thebrm
function, allowing to suppress most ofStan
's intermediate output. - Introduce new families
negbinomial
(negative binomial) andgeometric
to allow for more flexibility in modeling count data.
- Amend warning and error messages to make them more informative.
- Correct examples in the documentation.
- Extend the README file.
- Fix a bug that caused problems when formulas contained more complicated function calls.
- Fix a bug that caused an error when posterior predictives were sampled for
family
cumulative
. - Fix a bug that prohibited to use of improper flat priors for parameters that have proper priors by default.
- Initial release version