Git Product home page Git Product logo

m-clark / mixed-models-with-r Goto Github PK

View Code? Open in Web Editor NEW
121.0 121.0 39.0 60.25 MB

Covers the basics of mixed models, mostly using @lme4

Home Page: https://m-clark.github.io/mixed-models-with-R/

R 94.03% TeX 5.97%
brms covariance crossed-random-effects generalized-linear-mixed-models glmmtmb hierarchical-linear-models linear-mixed-models lme4 mixed-models multilevel-models nested-random-effects nlme r random-effects random-intercepts random-slopes variance-components

mixed-models-with-r's Introduction



Michael's GitHub Space




I'm Michael, and I do all manner of things within the realm of data science. Here you'll find source code for modeling, packages, general programming, and various other things.


R Python Stan


personal website Twitter LinkedIn


My github stats


mixed-models-with-r's People

Contributors

imgbotapp avatar m-clark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mixed-models-with-r's Issues

No notes on hypothesis testing with mixed models :(

Your deck is truly an excellent introduction to mixed models. I wish it had existed 3 years ago!
One thing I think is missing is a note on how to do hypothesis testing using LME.
I ended up using something like this

    #adding groups fixed effect
      model.test <-lmer(metric~experiment_treat+
                           (1|user_id)+(1|days_in),data=experiment_session_df,REML=F)
    # create a test
    anova(model.null,model.test) %>% 
      data.frame() %>%
      display(.)

    #display the model
    model.test %>%
      display(.) 

Where experiment_treat is the independent variable I really care about, but I want to extract the effect of user and time, while seeing the effect of time (days_in).
It would be good to have something about doing these kinds of hypothesis tests in your guide.
Cheers,
James

Related code examples

Hi Clark,

first of all thank you for this precious guides. I just want to ask you if there is the possibility to publish the related R snippets code (eg all the plots codes). Thanks in advance

Update 2022

  • Intro
  • Random Intercepts
  • Random slopes
  • Extensions
  • Issues
  • Bayesian
  • Supp/Appendix

Any idea if bigger data can be used with Julia (or Python) vs R?

Great book! Just finished it up. In the appendix you mentioned that Python and Julia offer a subset of modeling options that R does. You also mentioned that you've been able to build some models in R with over a million records. Do you know if Julia (or Python) can process larger amounts of data than R for running these types of models or any run time advantages? I would like to think Julia could but I'm not sure what the bottleneck is in the training of these models or to what extent there are multi-threading opportunities... Again, great book!

nesting vs. crossed

in first nested example use the default ward identifier (i.e. 'ward'), making for more comparison to nesting vs. crossed section later.

update spaghetti plots

use gganimate or at least add another level of transparency to clean up the spaghetti plots

covariance types

Thank you for such a nice Package.

  1. Can you add some special covariance structures? For example, FA0(2) or CSH(Heterogeneous Compound Symmetry).
  2. This package does not seem to support ANOVA.

other formats

If possible try to provide format that might be more print friendly. Currently epub will break with html based images (won't print any subsequent text), but perhaps it will be more viable in the future. PDF at present seems incompatible with the current approach.

A current solution is to minimize the menu, which is more print friendly than retaining.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.