Releases: paul-buerkner/brms
Releases · paul-buerkner/brms
brms 1.3.1
new features
- 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.
other changes
- Move
rstan
to 'Imports' andRcpp
to 'Depends' in order to avoid loadingrstan
into the global environment automatically.
bug fixes
- Fix a bug leading to unexpected errors
in some S3 methods when applied to ordinal models.
brms 1.3.0
new features
- Fit error-in-variables models
using functionme
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
to
TRUE
in addition functionse
. - Allow visualizing two-dimensional smooths
with themarginal_smooths
method.
other changes
- 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 bymarginal_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.
brms 1.2.0
new features
- 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 thehorseshoe
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 whensample_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.
other changes
- Improve computation of Bayes factors
in thehypothesis
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
.
bug fixes
- 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.
brms 1.1.0
new features
- 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 argumentcens
in the model formula. - Allow to compute
residuals
also based
on predicted values instead of fitted values.
other changes
- 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.
bug fixes
- Fix a bug that could result in incorrect
threshold estimates forcumulative
and
sratio
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
callingmarginal_effects
for weighted models.
brms 1.0.1
minor changes
- Center design matrices inside the Stan code instead of inside
make_standata
. - Get rid of several warning messages occuring on CRAN.
brms 1.0.0
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
.
new features
- 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 extendedlme4
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 namedzi
and
hu
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
argumenttrunc
in order to model varying
truncation points.
other changes
- 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
.
bug fixes
- 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
handlingdplyr
datasets thanks to the
GitHub user Atan1988.
brms 0.10.0
new features
- Add support for generalized additive mixed models
(GAMMs). Smoothing terms can be specified using
thes
andt2
functions in the model formula. - Introduce
as.data.frame
andas.matrix
methods forbrmsfit
objects.
other changes
- 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.
bug fixes
- 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 of
brmshypothesis
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 thesummary
method. - Fix problems when using variational Bayes
algorithms withbrms
while having
rstan
>= 2.10.0 installed thanks to the
Github user cwerner87.
brms 0.9.1
new features
- Allow the
/
symbol in group-level terms in
theformula
argument to indicate nested
grouping structures. - Allow to compute
WAIC
andLOO
based on the pointwise log-likelihood using argument
pointwise
to substantially reduce memory requirements.
other changes
- Add horizontal lines to the errorbars in
marginal_effects
plots for factors.
bug fixes
- 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
callingmarginal_effects
for predictors
that were generated with thebase::scale
function thanks to Tom Wallis. - Allow interactions of numeric and categorical
predictors inmarginal_effects
to be passed
to theeffects
argument in any order. - Fix a bug that could lead to incorrect results
ofpredict
and related methods when called with
newdata
in models using thepoly
function
thanks to Brock Ferguson. - Make sure that user-specified factor contrasts
are always applied in multivariate models.
brms 0.9.0
new features
- 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 thesparse
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.
other changes
- 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
themarginal_effects
method are always smooth. - Allow to define category specific effects in
ordinal models directly within theformula
argument.
bug fixes
- 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
withinR
, 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.
brms 0.8.0
new features
- Implement generalized non-linear models, which
can be specified with the help of thenonlinear
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
familyzero_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.
other changes
- 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 ofrstan
(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 theplot
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.
bug fixes
- 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 a
brmsfit
object thanks to Ruben Arslan. - Fix data preparation for multivariate models
if some responses areNA
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 by
WAIC
andLOO
for these models. - Fix some backwards compatibility issues of models fitted
with version <= 0.5.0 thanks to Ulf Koether.