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)
> 
> ## 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
> summary(bt, node = 2)

Call:
betatree(formula = accuracy ~ iq | iq, data = ReadingSkills)

Standardized weighted residuals 2:
   Min     1Q Median     3Q    Max 
-1.821 -0.521  0.061  0.849  1.063 

Coefficients (mean model with logit link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)    1.657      0.286    5.78  7.3e-09 ***
iq             1.466      0.248    5.92  3.2e-09 ***

Phi coefficients (precision model with log link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)    1.273      0.307    4.15  3.4e-05 ***
iq             2.048      0.331    6.19  5.9e-10 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Type of estimator: ML (maximum likelihood)
Log-likelihood: 39.4 on 4 Df
Pseudo R-squared: 0.149
Number of iterations: 17 (BFGS) + 1 (Fisher scoring) 
> summary(bt, node = 3)

Call:
betatree(formula = accuracy ~ iq | iq, data = ReadingSkills)

Standardized weighted residuals 2:
   Min     1Q Median     3Q    Max 
-2.455 -0.659 -0.079  0.813  1.610 

Coefficients (mean model with logit link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)   0.3809     0.0486    7.83  4.8e-15 ***
iq           -0.0862     0.0549   -1.57     0.12    

Phi coefficients (precision model with log link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)    4.808      0.414   11.61   <2e-16 ***
iq             0.826      0.395    2.09    0.036 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Type of estimator: ML (maximum likelihood)
Log-likelihood: 27.3 on 4 Df
Pseudo R-squared: 0.0391
Number of iterations: 16 (BFGS) + 2 (Fisher scoring) 
> library("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
> sctest(bt)
Error in UseMethod("estfun") : 
  no applicable method for 'estfun' applied to an object of class "c('betatree', 'modelparty', 'party')"
Calls: sctest -> sctest.default -> gefp -> scores
Execution halted