tests-as-linear VS brms

Compare tests-as-linear vs brms and see what are their differences.

tests-as-linear

Common statistical tests are linear models (or: how to teach stats) (by lindeloev)

brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan (by paul-buerkner)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
tests-as-linear brms
26 9
472 1,228
- -
0.0 9.3
2 months ago 5 days ago
JavaScript R
- GNU General Public License v3.0 only
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tests-as-linear

Posts with mentions or reviews of tests-as-linear. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-18.
  • Everything Is a Linear Model
    2 projects | news.ycombinator.com | 18 Feb 2024
    I knew the linked-in-the-article https://lindeloev.github.io/tests-as-linear/ which is also great. A bit meta on the widespread use of linear models: "Transcending General Linear Reality" by Andrew Abbott, DOI:10.2307/202114
  • Bayesians Moving from Defense to Offense
    2 projects | news.ycombinator.com | 25 Dec 2023
    Maybe you would find it useful to read a textbook on bayesian stats for inspiration. I can recommend Richard McElreath's "Statistical Rethinking" which makes it very clear how inflexible it is to just know recipes like t-tests or anovas.

    The canonical approach is to build a generative model with a parameter (or multiple for ~anova) that codes for the difference between groups and do inference on that parameter of interest. Most of the recipes taught in statistics classes can be modelled as a regression of some kind (this counts for frequentist stats too, see https://lindeloev.github.io/tests-as-linear/ ). Some advocate to do that inference with bayes factors. Others, like discussed elsewhere in this thread, advocate combining the resulting posterior with a cost/value function, but either way the lesson is that there is less focus on "t-test-vs-anova" because they're the same thing anyways.

  • Introduction to Modern Statistics
    9 projects | news.ycombinator.com | 12 Oct 2023
    As much as I appreciate and love all pedagogical endeavours in the field, especially in the form of open texts, I really, really, really dislike this overall approach to teaching introductory statistics.

    I'm hoping to see, over time, a shift away from ad-hoc null hypothesis testing in favour of linear models (yes, in introductory courses, from the start-- see link below) and Bayesian-by-default approaches.

    https://lindeloev.github.io/tests-as-linear/#:~:text=Most%20....

    9 projects | news.ycombinator.com | 12 Oct 2023
    I think those short courses would be more effective if they didn't bother with ANOVA and instead taught intro probability and distributions and then jumped straight to regression. ANOVA is just a really specific way of doing a regression.

    In R, and python::statsmodels you get the answer to (essentially) an ANOVA any time you run an LM or GLM; its the Z-statistic for your whole model.

    I know there is more nuance to this, but teaching students that they can use regression for most of the problems they would have used seemingly arcane tests for is going to be much more useful for the students.

    Here is a lovely page demonstrating how to do this in R: https://lindeloev.github.io/tests-as-linear/

    9 projects | news.ycombinator.com | 12 Oct 2023
    I understand where you're coming from, and I like the idea for a certain kind of people: those who are very good at handling abstractions. Software engineers do have this skill, but the majority of statistics users do not. Trying to explain the similarities between these linear methods and how all is one [1] to a social scientist who doesn't like numbers nor formulas to begin with would only lead to more confusion.

    But if you ever do a randomized test with a suitable linear model to estimate the efficacy of these two methods, do let us know, that would be 10/10 :)

    [1]: https://lindeloev.github.io/tests-as-linear/#41_one_sample_t...

  • Step-by-step example of Bayesian t-test?
    4 projects | /r/AskStatistics | 3 Apr 2022
    Second, one thing that is often overlooked is that most models can be seen as [variants of linear regression](https://lindeloev.github.io/tests-as-linear/), including t-tests. To estimate the difference between two variables using linear regression (in R), you use `lm(y ~ x, data = data), where `x` is the group variable (factor coded) and `y` is the variable of interest. If you suppress the intercept, you directly estimate the means of the two variables: `lm(y ~ 0 + x, data = data)`` . Finally, the t-test assumes equal variance between groups, which is often [a weird assumption](https://www.rips-irsp.com/articles/10.5334/irsp.82/). Thus we'll make sure to allow variance to differ.
  • [D] Looking for good refreshers on stats / ML to go back to the ML engineer interview game after 2 years doing mostly Software.
    3 projects | /r/MachineLearning | 17 Aug 2021
    Don't know about any cheat sheet but perhaps you'd find this pretty stimulating to read: https://lindeloev.github.io/tests-as-linear/

brms

Posts with mentions or reviews of brms. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-09.
  • Bayesian Structural Equation Modeling using blavaan
    2 projects | news.ycombinator.com | 9 Nov 2023
    [2] https://paul-buerkner.github.io/brms/
  • Step-by-step example of Bayesian t-test?
    4 projects | /r/AskStatistics | 3 Apr 2022
    Okay so first off, I recommend that you read [this](https://link.springer.com/article/10.3758/s13423-016-1221-4) article about "The Bayesian New Statistics", which highlights estimation rather than hypothesis testing from a Bayesian perspective (see Fig. 1, second row, second column). Instead of a t-test, then, we can *estimate the difference* between two groups/variables. If you want to go deeper than JASP etc, I recommend that you use [brms](https://paul-buerkner.github.io/brms/), or, if you want to go even deeper, [Stan](https://mc-stan.org/) (brms is a front-end to Stan).
  • [R] Are there methods for ridge and lasso regression that allow the introduction of weights to give more importance to some observations?
    2 projects | /r/MachineLearning | 23 Aug 2021
    I think the brms package (https://github.com/paul-buerkner/brms) or the blavaan package (http://ecmerkle.github.io/blavaan/) have support for SEM. I've never done it myself, so I unfortunately can't give you any direction for that in particular. However, I have used stan in multi-level meta-analysis regression (combining multiple CRISPRa experiments to find determinants of CRISPRa activity, see https://github.com/timydaley/CRISPRa-sgRNA-determinants/blob/master/metaAnalysis/NeuronAndSelfRenewalMetaMixtureRegression.Rmd) and had some success.
  • I have a small sample size time series with potentially lagged predictor values which are also time series. What could be potential methods to analyse these data?
    3 projects | /r/AskStatistics | 25 Apr 2021
    Anyway, I found I can include weights into the brm function by using gr(RE, by = var) to deal with the heterogeneous variance and it should automatically assume that each observation within a group is correlated according to the brms reference manual.
  • Brms: adding on a nonlinear component to working MLM model
    2 projects | /r/AskStatistics | 28 Feb 2021
    This is what actually should work- I must be declaring my variables incorrectly. The issue I'm having is that what you refer to as lin , I tried calling a few things, from b to LinPred (which worked in the link here: brms issue 47). When I've tried doing this, I receive errors that say "The following variables are missing from the dataset....[insert variable used to symbolize linear part of the model)". But I believe you're code is on the right path for what needs to be done- I'll try altering my syntax to be sure it resembles yours let you know if it works.
    2 projects | /r/AskStatistics | 28 Feb 2021
    Unfortunately, I can't just tag it onto to the working linear piece because brms doesn't allow for more than 2 level factor covariates in NL formulas. After much googling, I was able to find these brms github posts: 46 47 where they discuss how a NL component can be added. I've tried the syntax used, but it's still throwing errors. Here is one syntax I tried, going off of the information on those two links (where b1=lambda, b2= kappa)

What are some alternatives?

When comparing tests-as-linear and brms you can also consider the following projects:

rstan - RStan, the R interface to Stan

stan - Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.

tinytex - A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live

stat_rethinking_2020 - Statistical Rethinking Course Winter 2020/2021

rBAPS - R implementation of the BAPS software for Bayesian Analysis of Population Structure

CRISPRa-sgRNA-determinants

handson-ml2 - A series of Jupyter notebooks that walk you through the fundamentals of Machine Learning and Deep Learning in Python using Scikit-Learn, Keras and TensorFlow 2.

bambi - BAyesian Model-Building Interface (Bambi) in Python.

ims - 📚 Introduction to Modern Statistics - A college-level open-source textbook with a modern approach highlighting multivariable relationships and simulation-based inference. For v1, see https://openintro-ims.netlify.app.

bayesian - Bindings for Bayesian TidyModels

textbook - The textbook Computational and Inferential Thinking: The Foundations of Data Science