Skip to content
Snippets Groups Projects
Commit a1baafe8 authored by Layla Riemann's avatar Layla Riemann
Browse files

help file for R-code

parent 4aafd29d
No related branches found
No related tags found
No related merge requests found
#
# get_lme_sd_v1.r
#
get.sd.lme <- function(mod) {
sds <- exp(attr(mod$apVar, "Pars"))
names(sds) <- c(gsub("reStruct\\.", "", names(sds)[1:2]), "Residual")
sds
}
get.sd.lmer <- function(mod) {
vc <- VarCorr(mod)
sds <- unlist( lapply(vc, function(v) attr(v, "stddev")) )
names(sds) <- names(vc)
#NB: SDs are in decreasing order in nested models so ...
c( rev(sds), Residual=attr(vc, "sc"))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment