Running examples in ‘VetResearchLMM-Ex.R’ failed
The error most likely occurred in:

> ### Name: Examp2.4.2.2
> ### Title: Examp2.4.2.2 from Duchateau, L. and Janssen, P. and Rowlands, G.
> ###   J. (1998)._Linear Mixed Models. An Introduction with applications in
> ###   Veterinary Research_. International Livestock Research Institute.
> ### Aliases: Examp2.4.2.2
> ### Keywords: datasets
> 
> ### ** Examples
> 
> #-------------------------------------------------------------
> ## Example 2.4.2.2 p-64
> #-------------------------------------------------------------
> # PROC MIXED DATA=ex125 METHOD=ML;
> # CLASS drug dose region;
> # MODEL pcv=drug dose drug*dose;
> # RANDOM region drug*region;
> # RUN;
> # 
> # PROC MIXED DATA=ex125 METHOD=REML;
> # CLASS drug dose region;
> # MODEL pcv=drug dose drug*dose;
> # RANDOM region drug*region;
> # RUN;
>  
>  
> library(lme4)
Loading required package: Matrix
> str(ex125)
'data.frame':	24 obs. of  4 variables:
 $ Region: int  1 1 1 1 2 2 2 2 3 3 ...
 $ Drug  : Factor w/ 2 levels "BERENIL","samorin": 1 1 2 2 1 1 2 2 1 1 ...
 $ dose  : Factor w/ 2 levels "h","l": 1 2 1 2 1 2 1 2 1 2 ...
 $ Pcv   : num  22.6 21.8 19.1 16.4 29 28.8 25.3 18.2 24 23.7 ...
> 
> fm2.4 <- lme4::lmer(formula = Pcv ~ dose*Drug + (1|Region/Drug), data=ex125, REML = FALSE)
> summary(fm2.4)
Linear mixed model fit by maximum likelihood  ['lmerMod']
Formula: Pcv ~ dose * Drug + (1 | Region/Drug)
   Data: ex125

     AIC      BIC   logLik deviance df.resid 
   111.9    120.1    -48.9     97.9       17 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.87406 -0.56556  0.09217  0.76983  1.27213 

Random effects:
 Groups      Name        Variance Std.Dev.
 Drug:Region (Intercept) 0.3225   0.5679  
 Region      (Intercept) 4.2924   2.0718  
 Residual                1.7470   1.3217  
Number of obs: 24, groups:  Drug:Region, 12; Region, 6

Fixed effects:
                  Estimate Std. Error t value
(Intercept)        25.4500     1.0297  24.716
dosel              -1.1667     0.7631  -1.529
Drugsamorin        -3.9667     0.8306  -4.776
dosel:Drugsamorin  -3.1833     1.0792  -2.950

Correlation of Fixed Effects:
            (Intr) dosel  Drgsmr
dosel       -0.371              
Drugsamorin -0.403  0.459       
dsl:Drgsmrn  0.262 -0.707 -0.650
> anova(fm2.4)
Analysis of Variance Table
          Df Sum Sq Mean Sq F value
dose       1  45.65   45.65 26.1305
Drug       1 135.39  135.39 77.4955
dose:Drug  1  15.20   15.20  8.7008
> 
> fm2.5 <- lme4::lmer(formula = Pcv ~ dose*Drug + (1|Region/Drug), data=ex125, REML = TRUE)
> summary(fm2.5)
Linear mixed model fit by REML ['lmerMod']
Formula: Pcv ~ dose * Drug + (1 | Region/Drug)
   Data: ex125

REML criterion at convergence: 92.4

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.71077 -0.51628  0.08414  0.70276  1.16129 

Random effects:
 Groups      Name        Variance Std.Dev.
 Drug:Region (Intercept) 0.387    0.6221  
 Region      (Intercept) 5.151    2.2695  
 Residual                2.096    1.4479  
Number of obs: 24, groups:  Drug:Region, 12; Region, 6

Fixed effects:
                  Estimate Std. Error t value
(Intercept)        25.4500     1.1280  22.562
dosel              -1.1667     0.8359  -1.396
Drugsamorin        -3.9667     0.9098  -4.360
dosel:Drugsamorin  -3.1833     1.1822  -2.693

Correlation of Fixed Effects:
            (Intr) dosel  Drgsmr
dosel       -0.371              
Drugsamorin -0.403  0.459       
dsl:Drgsmrn  0.262 -0.707 -0.650
> anova(fm2.5)
Analysis of Variance Table
          Df Sum Sq Mean Sq F value
dose       1  45.65   45.65 21.7755
Drug       1 135.39  135.39 64.5796
dose:Drug  1  15.20   15.20  7.2507
> 
> library(lmerTest)

Attaching package: ‘lmerTest’

The following object is masked from ‘package:lme4’:

    lmer

The following object is masked from ‘package:stats’:

    step

> 
> fm2.6 <- lmerTest::lmer(formula = Pcv ~ dose*Drug + (1|Region/Drug), data=ex125, REML = FALSE)
> summary(fm2.6)
Linear mixed model fit by maximum likelihood t-tests use Satterthwaite
  approximations to degrees of freedom [lmerMod]
Formula: Pcv ~ dose * Drug + (1 | Region/Drug)
   Data: ex125

     AIC      BIC   logLik deviance df.resid 
   111.9    120.1    -48.9     97.9       17 

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.87406 -0.56556  0.09217  0.76983  1.27213 

Random effects:
 Groups      Name        Variance Std.Dev.
 Drug:Region (Intercept) 0.3225   0.5679  
 Region      (Intercept) 4.2924   2.0718  
 Residual                1.7470   1.3217  
Number of obs: 24, groups:  Drug:Region, 12; Region, 6

Fixed effects:
                  Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)        25.4500     1.0297  9.8500  24.716 3.43e-10 ***
dosel              -1.1667     0.7631 12.0000  -1.529 0.152229    
Drugsamorin        -3.9667     0.8306 14.1820  -4.776 0.000285 ***
dosel:Drugsamorin  -3.1833     1.0792 12.0000  -2.950 0.012151 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) dosel  Drgsmr
dosel       -0.371              
Drugsamorin -0.403  0.459       
dsl:Drgsmrn  0.262 -0.707 -0.650
> anova(fm2.6)

 *** caught segfault ***
address fe7a5c84, cause 'memory not mapped'

  it is not known that wchar_t is Unicode on this platform
Warning in bindingIsLocked(metaName, selfEnv) :
  it is not known that wchar_t is Unicode on this platform
Warning in bindingIsLocked(metaName, selfEnv) :
  it is not known that wchar_t is Unicode on this platform
Warning in bindingIsLocked(metaName, selfEnv) :
  it is not known that wchar_t is Unicode on this platform
summary from lme4 is returned
some computational error has occurred in lmerTest
Linear mixed model fit by REML ['lmerMod']
Formula: Pcv ~ dose * Drug + (1 | Region/Drug)
   Data: ex125

REML criterion at convergence: 92.4

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.71077 -0.51628  0.08414  0.70276  1.16129 

Random effects:
 Groups      Name        Variance Std.Dev.
 Drug:Region (Intercept) 0.387    0.6221  
 Region      (Intercept) 5.151    2.2695  
 Residual                2.096    1.4479  
Number of obs: 24, groups:  Drug:Region, 12; Region, 6

Fixed effects:
                  Estimate Std. Error t value
(Intercept)        25.4500     1.1280  22.562
dosel              -1.1667     0.8359  -1.396
Drugsamorin        -3.9667     0.9098  -4.360
dosel:Drugsamorin  -3.1833     1.1822  -2.693

Correlation of Fixed Effects:
            (Intr) dosel  Drgsmr
dosel       -0.371              
Drugsamorin -0.403  0.459       
dsl:Drgsmrn  0.262 -0.707 -0.650
> anova(fm2.7)

 *** caught segfault ***
address 60, cause 'memory not mapped'