File: extras.R

package info (click to toggle)
lme4 1.1-38-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,808 kB
  • sloc: cpp: 2,543; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 859 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(lme4)
## This example takes  long : only for testLevel >= 3 :
d.ok <- isTRUE(try(data(star, package = 'mlmRev')) == 'star')
if(!interactive() && (lme4:::testLevel() < 3 || !d.ok))
    q("no")

## This worked in an *older* version of lme4.0 
## fm1 <- lme4:::carryOver(math ~ gr+sx*eth+cltype+(yrs|id)+(1|tch)+(yrs|sch),
##                         star, yrs ~ tch/id,
##                         control = list(msV = 1, nit = 0, grad = 0))

system.time(
    fm1 <- lmer(math ~ gr + sx*eth + cltype + schtype + hdeg + clad + exp + trace +
                (yrs | id) + (1 | tch) + (yrs | sch), data = star, verbose = TRUE)
)
##   user  system elapsed 
## 34.991   0.037  35.132 -- lme4.0
## 36.599   0.031  36.745 -- lme4 {bobyqa; 2014-01-09 @ lynne}

sm1 <- summary(fm1)
print(sm1, corr=TRUE, symbolic.cor=TRUE)# now message *and* gives the correlation