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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: betatree
> ### Title: Beta Regression Trees
> ### Aliases: betatree plot.betatree print.betatree predict.betatree
> ###   sctest.betatree
> ### Keywords: tree
> 
> ### ** Examples
> 
> options(digits = 4)
> suppressWarnings(RNGversion("3.5.0"))
> 
> ## data with two groups of dyslexic and non-dyslexic children
> data("ReadingSkills", package = "betareg")
> ## additional random noise (not associated with reading scores)
> set.seed(1071)
> ReadingSkills$x1 <- rnorm(nrow(ReadingSkills))
> ReadingSkills$x2 <- runif(nrow(ReadingSkills))
> ReadingSkills$x3 <- factor(rnorm(nrow(ReadingSkills)) > 0)
> 
> ## fit beta regression tree: in each node
> ##   - accurcay's mean and precision depends on iq
> ##   - partitioning is done by dyslexia and the noise variables x1, x2, x3
> ## only dyslexia is correctly selected for splitting
> bt <- betatree(accuracy ~ iq | iq, ~ dyslexia + x1 + x2 + x3,
+   data = ReadingSkills, minsize = 10)
> plot(bt)
> 
> ## inspect result
> coef(bt)
  (Intercept)       iq (phi)_(Intercept) (phi)_iq
2      1.6565  1.46571             1.273    2.048
3      0.3809 -0.08623             4.808    0.826
> if(require("strucchange")) sctest(bt)
Loading required package: strucchange
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: sandwich
$`1`
           dyslexia     x1     x2     x3
statistic 2.269e+01 8.5251 5.5699 1.0568
p.value   5.848e-04 0.9095 0.9987 0.9999

$`2`
          dyslexia     x1     x2     x3
statistic        0 6.4116 4.5170 4.2308
p.value         NA 0.8412 0.9752 0.7566

$`3`
NULL

> ## IGNORE_RDIFF_BEGIN
> summary(bt, node = 2)
Error in z %*% gamma : requires numeric/complex matrix/vector arguments
Calls: summary ... predict -> predict -> predict.betareg -> <Anonymous> -> pmax
Execution halted