1 | Lall(fit, nam)
|
fit |
|
nam |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (fit, nam)
{
if (class(fit) != "lmer")
stop("only implemented for lmer")
v <- fit@frame[[nam]]
if (!is.factor(v))
stop("nam needs to specify the name of a factor")
lev0 <- levels(v)[1]
ret <- list()
namf <- nam
if (substring(namf, 1, 1) != "^")
namf <- paste("^", namf, sep = "")
ret[[nam]] <- Lmat(fit, namf)
ret[[paste(nam, "mu", sep = ".")]] <- Lmu(fit, nam)
ret[[paste(nam, "diff", sep = ".")]] <- Ldiff(fit, nam)
ret
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.