Running 'testglmmLasso.R' [177s]
Running the tests in 'tests/testglmmLasso.R' failed.
Complete output:
  > ###############
  > # preliminaries
  > library(glmmLasso)
  > data("soccer")
  > 
  > soccer[,c(4,5,9:16)]<-scale(soccer[,c(4,5,9:16)],center=TRUE,scale=TRUE)
  > soccer<-data.frame(soccer)
  > 
  > ###############
  > ## linear mixed model
  > lm1 <- glmmLasso(points ~ transfer.spendings + ave.unfair.score 
  +                  + ball.possession + tackles 
  +                  + ave.attend + sold.out, rnd = list(team=~1), 
  +                  lambda=50, data = soccer)
  > 
  > summary(lm1)
  Call:
  glmmLasso(fix = points ~ transfer.spendings + ave.unfair.score + 
      ball.possession + tackles + ave.attend + sold.out, rnd = list(team = ~1), 
      data = soccer, lambda = 50)
  
  
  Fixed Effects:
  
  Coefficients:
                     Estimate StdErr z.value p.value
  (Intercept)        46.34413     NA      NA      NA
  transfer.spendings  3.39433     NA      NA      NA
  ave.unfair.score    0.00000     NA      NA      NA
  ball.possession     0.66286     NA      NA      NA
  tackles             0.84893     NA      NA      NA
  ave.attend          2.40314     NA      NA      NA
  sold.out            4.33194     NA      NA      NA
  
  Random Effects:
  
  StdDev:
          team
  team 1.92366
  > 
  > ## similar linear model without random effects
  > lm1b <- glmmLasso(points ~ transfer.spendings + ave.unfair.score 
  +                   + ball.possession + tackles 
  +                   + ave.attend + sold.out, rnd = NULL, 
  +                   lambda=50, data = soccer)
  > 
  > summary(lm1b)
  Call:
  glmmLasso(fix = points ~ transfer.spendings + ave.unfair.score + 
      ball.possession + tackles + ave.attend + sold.out, rnd = NULL, 
      data = soccer, lambda = 50)
  
  
  Fixed Effects:
  
  Coefficients:
                     Estimate StdErr z.value p.value
  (Intercept)         46.5926     NA      NA      NA
  transfer.spendings   3.8921     NA      NA      NA
  ave.unfair.score     0.0000     NA      NA      NA
  ball.possession      1.3857     NA      NA      NA
  tackles              0.0000     NA      NA      NA
  ave.attend           2.3437     NA      NA      NA
  sold.out             4.3338     NA      NA      NA
  
  No random effects included!
  > 
  > 
  > ## linear mixed model with slope on ave.attend;  
  > ## the coefficient of ave.attend is not penalized;
  > lm2 <- glmmLasso(points~transfer.spendings + ave.unfair.score 
  +                  + ball.possession + tackles + ave.attend 
  +                  + sold.out, rnd = list(team=~1 + ave.attend), lambda=10, 
  +                  data = soccer, control = list(index=c(1,2,3,4,NA,5), 
  +                                                method="REML",print.iter=TRUE))
  Iteration  1
  Iteration  2
  Iteration  3
  Iteration  4
  Iteration  5
  Iteration  6
  Iteration  7
  Iteration  8
  Iteration  9
  Iteration  10
  Iteration  11
  Iteration  12
  Iteration  13
  Iteration  14
  Iteration  15
  Iteration  16
  Iteration  17
  Iteration  18
  Iteration  19
  Iteration  20
  Iteration  21
  Iteration  22
  Iteration  23
  Iteration  24
  Iteration  25
  Iteration  26
  Iteration  27
  Iteration  28
  Iteration  29
  Iteration  30
  Iteration  31
  Iteration  32
  Iteration  33
  Iteration  34
  Iteration  35
  Iteration  36
  Iteration  37
  Iteration  38
  Iteration  39
  Iteration  40
  Iteration  41
  Iteration  42
  Iteration  43
  Iteration  44
  Iteration  45
  Iteration  46
  Iteration  47
  Iteration  48
  Iteration  49
  Iteration  50
  Iteration  51
  Iteration  52
  Iteration  53
  Iteration  54
  Iteration  55
  Iteration  56
  Iteration  57
  Iteration  58
  Iteration  59
  Iteration  60
  Iteration  61
  Iteration  62
  Iteration  63
  Iteration  64
  Iteration  65Warning message:
  In est.glmmLasso.RE(fix = fix, rnd = rnd, data = data, lambda = lambda,  :
    Random slopes are not standardized back!
  > 
  > summary(lm2)
  Call:
  glmmLasso(fix = points ~ transfer.spendings + ave.unfair.score + 
      ball.possession + tackles + ave.attend + sold.out, rnd = list(team = ~1 + 
      ave.attend), data = soccer, lambda = 10, control = list(index = c(1, 
      2, 3, 4, NA, 5), method = "REML", print.iter = TRUE))
  
  
  Fixed Effects:
  
  Coefficients:
                      Estimate StdErr z.value p.value
  (Intercept)        45.381510     NA      NA      NA
  transfer.spendings  2.525178     NA      NA      NA
  ave.unfair.score   -0.035802     NA      NA      NA
  ball.possession    -0.566986     NA      NA      NA
  tackles             0.000000     NA      NA      NA
  sold.out            5.079927     NA      NA      NA
  ave.attend          4.537369     NA      NA      NA
  
  Random Effects:
  
  StdDev:
                        team team:ave.attend
  team             5.0000000      -0.4918122
  team:ave.attend -0.4918122       5.0000000
  > 
  > ## linear mixed model with categorical covariates
  > ## and final Fisher scoring re-estimation step
  > lm3 <- glmmLasso(points ~ transfer.spendings + as.factor(red.card)  
  +                  + as.factor(yellow.red.card) + ball.possession 
  +                  + tackles + ave.attend + sold.out, rnd = list(team=~1), 
  +                  data = soccer, lambda=100, final.re=TRUE,
  +                  control = list(print.iter=TRUE,print.iter.final=TRUE))
  Iteration  1
  Iteration  2
  Iteration  3
  Iteration  4
  Final Re-estimation Iteration  1
  Final Re-estimation Iteration  2
  Final Re-estimation Iteration  3
  Final Re-estimation Iteration  4
  Final Re-estimation Iteration  5
  Final Re-estimation Iteration  6> 
  > summary(lm3)
  Call:
  glmmLasso(fix = points ~ transfer.spendings + as.factor(red.card) + 
      as.factor(yellow.red.card) + ball.possession + tackles + 
      ave.attend + sold.out, rnd = list(team = ~1), data = soccer, 
      lambda = 100, final.re = TRUE, control = list(print.iter = TRUE, 
          print.iter.final = TRUE))
  
  
  Fixed Effects:
  
  Coefficients:
                              Estimate   StdErr  z.value   p.value    
  (Intercept)                 46.40635  3.72064  12.4727 < 2.2e-16 ***
  transfer.spendings           1.68662  0.22881   7.3711 1.692e-13 ***
  as.factor(red.card)1         4.25562  0.49066   8.6732 < 2.2e-16 ***
  as.factor(red.card)2        -0.43553  0.59082  -0.7371  0.461032    
  as.factor(red.card)3         1.93277  0.60883   3.1746  0.001501 ** 
  as.factor(red.card)4        -9.96578  1.04159  -9.5679 < 2.2e-16 ***
  as.factor(red.card)6         9.79310  1.54008   6.3588 2.033e-10 ***
  as.factor(yellow.red.card)1  0.00000       NA       NA        NA    
  as.factor(yellow.red.card)2  0.00000       NA       NA        NA    
  as.factor(yellow.red.card)3  0.00000       NA       NA        NA    
  as.factor(yellow.red.card)4  0.00000       NA       NA        NA    
  as.factor(yellow.red.card)5  0.00000       NA       NA        NA    
  ball.possession             -5.83490  0.46765 -12.4771 < 2.2e-16 ***
  tackles                     -3.79208  0.36889 -10.2797 < 2.2e-16 ***
  ave.attend                  22.91610  1.37767  16.6339 < 2.2e-16 ***
  sold.out                     3.23552  0.39285   8.2361 < 2.2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Random Effects:
  
  StdDev:
           team
  team 17.77996
  > 
  > ## generalized linear mixed model
  > ## with starting values
  > glm1 <- glmmLasso(points~transfer.spendings  
  +                   + ave.unfair.score + sold.out 
  +                   + tackles + ave.attend + ball.possession, rnd = list(team=~1),  
  +                   family = poisson(link = log), data = soccer, lambda=100, 
  +                   control = list(print.iter=TRUE,start=c(1,rep(0,29)),q_start=0.7)) 
  Iteration  1
  Iteration  2
  Iteration  3
  Iteration  4
  Iteration  5
  Iteration  6
  Iteration  7
  Iteration  8
  Iteration  9
  Iteration  10
  Iteration  11
  Iteration  12
  Iteration  13
  Iteration  14
  Iteration  15
  Iteration  16
  Iteration  17
  Iteration  18
  Iteration  19
  Iteration  20
  Iteration  21
  Iteration  22
  Iteration  23
  Iteration  24
  Iteration  25
  Iteration  26
  Iteration  27
  Iteration  28
  Iteration  29
  Iteration  30
  Iteration  31
  Iteration  32
  Iteration  33
  Iteration  34
  Iteration  35
  Iteration  36
  Iteration  37
  Iteration  38
  Iteration  39
  Iteration  40
  Iteration  41
  Iteration  42
  Iteration  43
  Iteration  44
  Iteration  45
  Iteration  46
  Iteration  47
  Iteration  48
  Iteration  49
  Iteration  50
  Iteration  51
  Iteration  52
  Iteration  53
  Iteration  54
  Iteration  55
  Iteration  56
  Iteration  57
  Iteration  58
  Iteration  59
  Iteration  60> 
  > 
  > proc.time()
     user  system elapsed 
     4.26    0.43    4.68