Skip to content

Instantly share code, notes, and snippets.

@palday
Last active February 11, 2016 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save palday/b95ed5370ac6592db321 to your computer and use it in GitHub Desktop.
Save palday/b95ed5370ac6592db321 to your computer and use it in GitHub Desktop.
Useful R packages for mixed effects models
packages.rforge <- c(
"R2admb"
,"lme4.0"
,"glmmADMB"
)
rforge.prefix <- c(
""
,"lme4."
,"coefplot2."
,"glmmADMB."
)
rforge.suffix <- c(
""
,"/repos"
,"/repos"
)
i <- 0
for(p in packages.rforge){
i <- i + 1
if(!require(p,character.only=TRUE)){
install.packages(p
,repos=paste0("http://",rforge.prefix[i],"r-forge.r-project.org",rforge.suffix[i]))
}
}
# coefplot2
if(!require(coefplot2)){
install.packages("coefplot2",repos="http://www.math.mcmaster.ca/bolker/R")
}
# glmer2stan
options(repos = c(getOption("repos"), rstan = "http://wiki.rstan-repo.googlecode.com/git/"))
install.packages('rstan', type = 'source')
options(repos=c(getOption('repos'), glmer2stan="http://xcelab.net/R"))
install.packages('glmer2stan', type='source')
packages <- c(
"aods3"
,"arm"
,"bbmle"
,"bestglm"
,"blme"
,"boot"
,"brglm"
,"coda"
,"coefplot"
,"effects"
,"emdbook"
,"gam"
,"gamm4"
,"ggplot2"
,"glm2"
,"glmmML"
,"glmnet"
,"grid"
,"gridExtra"
,"hglm"
,"Hmisc"
,"inline"
,"languageR"
,"lme4"
,"LMERConvenienceFunctions"
,"lmerTest"
,"lsmeans"
,"MASS"
,"MCMCglmm"
,"mgcv"
,"mixlm"
,"mlogit"
,"nlme"
,"numDeriv"
,"optimx"
,"pbkrtest"
,"penalized"
,"plotrix"
,"plotMCMC"
,"plyr"
,"proto"
,"pscl"
,"Rcpp"
,"reshape2"
,"robustlmm"
,"safeBinaryRegression"
,"scales"
,"VGAM"
)
for(p in packages){
if(!require(p,character.only=TRUE)){
install.packages(p)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment