Skip to content

dirmeier/greta.lme

Repository files navigation

greta.lme

Project Status Project Life codecov CRAN

a greta extension for hierarchical models

About

greta.lme is an extension package for greta to allow easier building of hierarchical models, such as mixed effect models. For example, a normal hierarchical model using random intercepts for the iris data set in lme4 formula style:

mod <- greta.glmer(Sepal.Length ~ Sepal.Width + (1 | Species), iris)
sd <- inverse_gamma(1, 1)
 
distribution(iris$Sepal.Length) <- normal(mod$predictor, sd)
m <- model(mod$coef, mod$gamma)
d <- mcmc(m)

Installation

devtools::install_github("greta-dev/greta")
devtools::install_github("dirmeier/greta.lme")

The current greta.lme release uses the same version numbers as the current greta release, such that it's easier to see what works together, e.g.

devtools::install_github("greta-dev/greta@0.3.0")
devtools::install_github("dirmeier/greta.lme@0.3.0")

Author