brms 1.3.1

@paul-buerkner paul-buerkner released this Dec 22, 2016 · 95 commits to master since this release

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' and Rcpp
    to 'Depends' in order to avoid loading rstan
    into the global environment automatically.

bug fixes

  • Fix a bug leading to unexpected errors
    in some S3 methods when applied to ordinal models.

Downloads

brms 1.3.0

@paul-buerkner paul-buerkner released this Dec 19, 2016 · 113 commits to master since this release

new features

  • 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)
    and wiener (Wiener diffusion model distribution)
    specifically suited to handle for response times.
  • Add the lasso prior as an alternative
    to the horseshoe prior for sparse models.
  • Add the methods log_posterior,
    nuts_params, rhat, and neff_ratio
    for brmsfit objects to conveniently access
    quantities used to diagnose sampling behavior.
  • Combine chains in method as.mcmc using
    argument combine_chains.
  • Estimate the auxiliary parameter
    sigma in models with known standard errors of
    the response by setting argument sigma to
    TRUE in addition function se.
  • Allow visualizing two-dimensional smooths
    with the marginal_smooths method.

other changes

  • Require argument data to be explicitely
    specified in all user facing functions.
  • Refactor the stanplot method
    to use bayesplot on the backend.
  • Use the bayesplot theme as the default
    in all plotting functions.
  • Add the abbreviations mo and cs
    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 native cores argument of rstan instead.
  • Remove argument cluster_type as it is
    no longer required to apply forking.
  • Remove the deprecated partial argument.

Downloads

brms 1.2.0

@paul-buerkner paul-buerkner released this Nov 22, 2016 · 182 commits to master since this release

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 the bayesplot 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 and prior_string
    as aliases of set_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
    for brmsfit 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 and log_lik as
    (partial) aliases of predict, residuals,
    and logLik respectively.

other changes

  • 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 of plot.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 the Stan code
    is necessary thanks to Raphael P.H.
  • Allow to correctly update the sample_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.

Downloads

brms 1.1.0

@paul-buerkner paul-buerkner released this Oct 11, 2016 · 254 commits to master since this release

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 argument cens 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 prefix bm
    in parameter names of monotonic effects (instead
    of the prefix b) to simplify their identifaction.
  • Ensure full compatibility with
    ggplot2 version 2.2.

bug fixes

  • Fix a bug that could result in incorrect
    threshold estimates for cumulative 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
    calling marginal_effects for weighted models.

Downloads

brms 1.0.1

@paul-buerkner paul-buerkner released this Sep 16, 2016 · 319 commits to master since this release

minor changes

  • Center design matrices inside the Stan code instead of inside make_standata.
  • Get rid of several warning messages occuring on CRAN.

Downloads

brms 1.0.0

@paul-buerkner paul-buerkner released this Sep 14, 2016 · 332 commits to master since this release

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 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 and
    hu defining zero-inflation / hurdle probabilities.
  • Implement the von_mises family to model
    circular responses.
  • Introduce the brmsfamily function for
    convenient specification of family 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.

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
    to TRUE in marginal_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
    and coef methods with non-linear models.
  • Fix problems that occasionally occured when
    handling dplyr datasets thanks to the
    GitHub user Atan1988.

Downloads

brms 0.10.0

@paul-buerkner paul-buerkner released this Jun 29, 2016 · 558 commits to master since this release

new features

  • Add support for generalized additive mixed models
    (GAMMs). Smoothing terms can be specified using
    the s and t2 functions in the model formula.
  • Introduce as.data.frame and as.matrix
    methods for brmsfit 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 of glm.
    The log-normal distribution can now be specified via
    family lognormal.
  • Update syntax of Stan models to match the
    recommended syntax of Stan 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 variable intercept
    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 the summary method.
  • Fix problems when using variational Bayes
    algorithms with brms while having
    rstan >= 2.10.0 installed thanks to the
    Github user cwerner87.

Downloads

brms 0.9.1

@paul-buerkner paul-buerkner released this May 17, 2016 · 672 commits to master since this release

new features

  • Allow the / symbol in group-level terms in
    the formula argument to indicate nested
    grouping structures.
  • Allow to compute WAIC and LOO
    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 the update method.
  • Fix a bug that could lead to an error when
    calling marginal_effects for predictors
    that were generated with the base::scale
    function thanks to Tom Wallis.
  • Allow interactions of numeric and categorical
    predictors in marginal_effects to be passed
    to the effects argument in any order.
  • Fix a bug that could lead to incorrect results
    of predict and related methods when called with
    newdata in models using the poly function
    thanks to Brock Ferguson.
  • Make sure that user-specified factor contrasts
    are always applied in multivariate models.

Downloads

brms 0.9.0

@paul-buerkner paul-buerkner released this Apr 18, 2016 · 715 commits to master since this release

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 deviation sigma so that it can be
    used to weight observations.
  • Treat the fixed effects design matrix as sparse
    by using the sparse argument of brm.
    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 argument stan_funs of brm.
  • Add the expose_functions method allowing to
    expose self-defined Stan functions in R.
  • 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
    the marginal_effects method are always smooth.
  • Allow to define category specific effects in
    ordinal models directly within the formula
    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
    within R, occuring for ordinal models
    with multiple category specific effects. This
    could lead to incorrect outputs of predict,
    fitted, and logLik for these models.
  • Make sure that the global "contrasts" option
    is not used when post-processing a model.

Downloads

brms 0.8.0

@paul-buerkner paul-buerkner released this Feb 15, 2016 · 983 commits to master since this release

new features

  • Implement generalized non-linear models, which
    can be specified with the help of the nonlinear
    argument in brm.
  • 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 and ub in function set_prior
    thanks to the idea of Joel Gombin.
  • Add an as.mcmc method for compatibility
    with the coda package.
  • Allow to call the WAIC, LOO,
    and logLik methods with new data.

other changes

  • Make sure that brms is fully compatible
    with loo 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 and warmup = 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
    to inst/chunks and incorporate them into the
    models using rstan::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 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 and hurdle_negbinomial models.
    This may lead to minor changes in the values obtained by
    WAIC and LOO for these models.
  • Fix some backwards compatibility issues of models fitted
    with version <= 0.5.0 thanks to Ulf Koether.

Downloads