Skip to content

Instantly share code, notes, and snippets.

@jcheong0428
Created March 20, 2021 05:26
Show Gist options
  • Save jcheong0428/620477e0869e2f6f41083c59ede4fb0f to your computer and use it in GitHub Desktop.
Save jcheong0428/620477e0869e2f6f41083c59ede4fb0f to your computer and use it in GitHub Desktop.
Run LMER using Rpy2
# make sure rpy2 was loaded using %load_ext rpy2.ipython
%%R
library(lme4)
library(lmerTest)
data(dietox, package='geepack')
m<-lmer('Weight ~ Time + (1+Time|Pig)', data=dietox)
print(summary(m))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment