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

> ### Name: add_pi
> ### Title: Add Prediction Intervals to Data Frames
> ### Aliases: add_pi
> 
> ### ** Examples
> 
> # Fit a linear model
> fit <- lm(dist ~ speed, data = cars)
> # Define some new data
> new_data <- cars[sample(NROW(cars), 10), ]
> # Add fitted values and prediction intervals to new_data
> add_pi(new_data, fit)
   speed dist      pred   LPB0.025 UPB0.975
4      7   22  9.947766 -22.061423 41.95696
39    20   32 61.069080  29.603089 92.53507
1      4    2 -1.849460 -34.499842 30.80092
34    18   76 53.204263  21.898386 84.51014
23    14   80 37.474628   6.222305 68.72695
43    20   64 61.069080  29.603089 92.53507
14    12   24 29.609810  -1.749529 60.96915
18    13   34 33.542219   2.247492 64.83695
33    18   56 53.204263  21.898386 84.51014
21    14   36 37.474628   6.222305 68.72695
> 
> # Fit a Poisson model
> fit2 <- glm(dist ~ speed, family = "poisson", data = cars)
> # Add approximate prediction intervals to the fitted values of
> # new_data
> add_pi(new_data, fit2)
Warning in add_pi.glm(new_data, fit2) :
  The response is not continuous, so Prediction Intervals are approximate
   speed dist     pred LPB0.025 UPB0.975
4      7   22 16.88588        9       26
39    20   32 59.20520       44       75
1      4    2 12.64132        6       21
34    18   76 48.81339       35       64
23    14   80 33.18158       22       46
43    20   64 59.20520       45       74
14    12   24 27.35748       18       38
18    13   34 30.12913       20       41
33    18   56 48.81339       35       62
21    14   36 33.18158       22       45
> 
> # Fit a linear mixed model
> fit3 <- lme4::lmer(Reaction ~ Days + (1|Subject), data = lme4::sleepstudy)
> # Add parametric prediction intervals for the fitted values to the
> # original data
> add_pi(lme4::sleepstudy, fit3, type = "parametric")
Error in tcrossprod(sc * Li) : "tcrossprod" is not a BUILTIN function
Calls: add_pi ... VarCorr.merMod -> structure -> mkVarCorr -> lapply -> FUN
Execution halted