🎓 Tidy multilevel modeling tools for academics
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
man
.Rbuildignore
.gitignore
DESCRIPTION
LICENSE
LICENSE.md
NAMESPACE
NOTES.md
README.Rmd
README.md
logo.R
make.R
tidymlm.Rproj

README.md

tidymlm

lifecycle

🎓 Tidy tools for academics

*** This package is in very early development. Feedback is encouraged!!! ***

Installation

Install the development version from Github with:

## install devtools if not already
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}
## install tidymlm from Github
devtools::install_github("mkearney/tidymlm")

Load the package (it, of course, plays nicely with tidyverse).

## load tidyverse
library(tidyverse)

## load tidymlm
library(tidymlm)

Multilevel modeling (MLM)

Estimate multilevel (mixed effects) models.

lme4::sleepstudy %>%
  tidy_mlm(Reaction ~ Days + (Days | Subject)) %>%
  summary()
#> Linear mixed model fit by REML ['lmerMod']
#> Formula: Reaction ~ Days + (Days | Subject)
#>    Data: .data
#> 
#> REML criterion at convergence: 1743.6
#> 
#> Scaled residuals: 
#>    Min     1Q Median     3Q    Max 
#> -3.954 -0.463  0.023  0.463  5.179 
#> 
#> Random effects:
#>  Groups   Name        Variance Std.Dev. Corr
#>  Subject  (Intercept) 612.1    24.74        
#>           Days         35.1     5.92    0.07
#>  Residual             654.9    25.59        
#> Number of obs: 180, groups:  Subject, 18
#> 
#> Fixed effects:
#>             Estimate Std. Error t value
#> (Intercept)   251.41       6.82   36.84
#> Days           10.47       1.55    6.77
#> 
#> Correlation of Fixed Effects:
#>      (Intr)
#> Days -0.138