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

> ### Name: Examp3.1
> ### Title: Examp3.1 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: Examp3.1
> ### Keywords: datasets
> 
> ### ** Examples
> 
> #-------------------------------------------------------------
> ## Example 3.1 Model 1 p-80
> #-------------------------------------------------------------
> # PROC MIXED DATA=ex31;
> # CLASS drug dose herd;
> # MODEL PCV2=drug dose(drug)/solution ddfm=satterth;
> # RANDOM herd(drug);
> # ESTIMATE 'Mean Samorin' intercept 1 drug 0 1 dose(drug) 0 0 1;
> # ESTIMATE 'Berenil 2 doses' dose(drug) 1 -1 0;
> # ESTIMATE 'Ber vs Sam at dose 1' drug 1 -1 dose(drug) 1 0 -1;
> # CONTRAST 'Mean Samorin' intercept 1 drug 0 1 dose(drug) 0 0 1;
> # CONTRAST 'Berenil dif 2 doses' dose(drug) 1 -1 0;
> # CONTRAST 'Ber vs Sam at dose 1' drug 1 -1 dose(drug) 1 0 -l;
> # CONTRAST 'some difference' drug 1 -1 dose(drug) 0.5 0.5 -1,
> #           drug 0 0 dose(drug) 1 -1 0;
> # LSMEANS dose(drug);
> # RUN;
> 
>  library(lmerTest)
Loading required package: lme4
Loading required package: Matrix

Attaching package: 'lmerTest'

The following object is masked from 'package:lme4':

    lmer

The following object is masked from 'package:stats':

    step

>  str(ex31)
'data.frame':	38 obs. of  6 variables:
 $ herd     : int  1 1 1 1 1 1 1 1 1 2 ...
 $ animal_id: int  667 1003 1177 227 241 271 44 48 233 1368 ...
 $ PCV1     : int  17 22 20 22 22 18 22 21 18 18 ...
 $ PCV2     : int  28 23 28 25 23 18 27 20 30 20 ...
 $ dose     : int  1 1 1 2 2 2 1 1 1 1 ...
 $ drug     : Factor w/ 2 levels "BERENIL","SAMORIN": 1 1 1 1 1 1 2 2 2 1 ...
>  ex31$drug1 <- factor(ex31$drug)
>  ex31$dose1 <- factor(ex31$dose)
>  ex31$herd1 <- factor(ex31$herd)
> 
>  fm3.1 <-
+   lmerTest::lmer(
+          formula    = PCV2 ~ drug1 + dose1:drug1 + (1|herd1:drug1)
+        , data       = ex31
+        , REML       = TRUE
+        , control    = lmerControl()
+        , start      = NULL
+        , verbose    = 0L
+     #  , subset
+     #  , weights
+     #  , na.action
+     #  , offset
+        , contrasts  = list(dose1 = "contr.SAS", drug1 = "contr.SAS")
+        , devFunOnly = FALSE
+     #  , ...
+        )
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
Warning in qr2rankMatrix(q.r, tol = tol, isBqr = x.dense, do.warn = warn.qr) :
  qr2rankMatrix(.): QR has negative diag(R) entries
Error: Dropping columns failed to produce full column rank design matrix
Execution halted