Lc: Hypothesis matrix for lmer objects: comparisons with...

Usage Arguments Examples

View source: R/wald.R

Usage

1
Lc(fit, nam, ref = 1, verbose = 0)

Arguments

fit
nam
ref
verbose

Examples

 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, ref = 1, verbose = 0) 
{
    if (class(fit) != "lmer") 
        stop("only implemented for lmer")
    L <- Lmu(fit, nam)
    Lref <- L[ref, , drop = F]
    index <- 1:nrow(L)
    names(index) <- rownames(L)
    refind <- index[ref]
    if (length(refind) != 1) 
        stop(paste(ref, "does not refer to a single level"))
    Lret <- L[-refind, ]
    Lret <- Lret - cbind(rep(1, nrow(Lret))) %*% Lref
    attr(Lret, "heading") <- paste("Comparisons with reference level:", 
        rownames(L)[refind])
    Lret
  }

gmonette/spida documentation built on May 17, 2019, 7:25 a.m.