Errors in running code in vignettes:
when running code in ‘betareg-ext.Rnw’
  ...

> options(width = 70, prompt = "R> ", continue = "+  ", 
+     useFancyQuotes = FALSE)

> library("betareg")

> combine <- function(x, sep, width) {
+     cs <- cumsum(nchar(x))
+     remaining <- if (any(cs[-1] > width)) 
+         combine(x[c(FALSE, cs[-1] > .... [TRUNCATED] 

> prettyPrint <- function(x, sep = " ", linebreak = "\n\t", 
+     width = getOption("width")) {
+     x <- strsplit(x, sep)[[1]]
+     paste(combine( .... [TRUNCATED] 

> cache <- FALSE

> enumerate <- function(x) paste(paste(x[-length(x)], 
+     collapse = ", "), x[length(x)], sep = " and ")

> betamix_methods <- enumerate(paste("\\\\fct{", gsub("\\.betamix", 
+     "", as.character(methods(class = "betamix"))), "}", sep = ""))

> cat(prettyPrint(prompt(extraComponent, filename = NA)$usage[[2]], 
+     sep = ", ", linebreak = paste("\n", paste(rep(" ", 2), collapse = ""), 
+   .... [TRUNCATED] 
extraComponent(type = c("uniform", "betareg"), coef, delta,  
  link = "logit", link.phi = "log")
> data("ReadingSkills", package = "betareg")

> mean_accuracy <- format(round(with(ReadingSkills, 
+     tapply(accuracy, dyslexia, mean)), digits = 3), nsmall = 3)

> mean_iq <- format(round(with(ReadingSkills, tapply(iq, 
+     dyslexia, mean)), digits = 3), nsmall = 3)

> data("ReadingSkills", package = "betareg")

> rs_ols <- lm(qlogis(accuracy) ~ dyslexia * iq, data = ReadingSkills)

> rs_beta <- betareg(accuracy ~ dyslexia * iq | dyslexia + 
+     iq, data = ReadingSkills, hessian = TRUE)

> cl1 <- hcl(c(260, 0), 90, 40)

> cl2 <- hcl(c(260, 0), 10, 95)

> plot(accuracy ~ iq, data = ReadingSkills, col = cl2[as.numeric(dyslexia)], 
+     main = "Reading skills data", xlab = "IQ score", ylab = "Reading a ..." ... [TRUNCATED] 

> points(accuracy ~ iq, data = ReadingSkills, cex = 1.5, 
+     pch = (1:2)[as.numeric(dyslexia)], col = cl1[as.numeric(dyslexia)])

> nd <- data.frame(dyslexia = "no", iq = -30:30/10)

> lines(nd$iq, predict(rs_beta, nd), col = cl1[1], lwd = 2)

> lines(nd$iq, plogis(predict(rs_ols, nd)), col = cl1[1], 
+     lty = 2, lwd = 2)

> nd <- data.frame(dyslexia = "yes", iq = -30:30/10)

> lines(nd$iq, predict(rs_beta, nd), col = cl1[2], lwd = 2)

> lines(nd$iq, plogis(predict(rs_ols, nd)), col = cl1[2], 
+     lty = 2, lwd = 2)

> legend("topleft", c("control", "dyslexic", "betareg", 
+     "lm"), lty = c(NA, NA, 1:2), pch = c(19, 17, NA, NA), lwd = 2, 
+     col = c(cl2, 1, 1 .... [TRUNCATED] 

> legend("topleft", c("control", "dyslexic", "betareg", 
+     "lm"), lty = c(NA, NA, 1:2), pch = c(1, 2, NA, NA), col = c(cl1, 
+     NA, NA), bty =  .... [TRUNCATED] 

> data("ReadingSkills", package = "betareg")

> rs_f <- accuracy ~ dyslexia * iq | dyslexia * iq

> rs_ml <- betareg(rs_f, data = ReadingSkills, type = "ML")

> rs_bc <- betareg(rs_f, data = ReadingSkills, type = "BC")

> rs_br <- betareg(rs_f, data = ReadingSkills, type = "BR")

> rs_list <- list(rs_ml, rs_bc, rs_br)

> cf <- paste("$", format(round(sapply(rs_list, coef), 
+     digits = 3), nsmall = 3), "$\\phantom{)}", sep = "")

> se <- paste("(", format(round(sapply(rs_list, function(x) sqrt(diag(vcov(x)))), 
+     digits = 3), nsmall = 3), ")", sep = "")

> ll <- paste("$", format(round(sapply(rs_list, logLik), 
+     digits = 3), nsmall = 3), "$\\phantom{)}", sep = "")

> cfse <- matrix(as.vector(rbind(cf, se)), ncol = 3)

> cfse <- cbind(c("Mean", rep("", 7), "Precision", rep("", 
+     7)), rep(as.vector(rbind(c("(Intercept)", "\\code{dyslexia}", 
+     "\\code{iq}", " ..." ... [TRUNCATED] 

> cfse <- rbind(cfse, c("Log-likelihood", "", ll[1:2], 
+     paste(ll[3], "\\\\ \\hline")))

> writeLines(apply(cfse, 1, paste, collapse = " & "))
Mean & (Intercept) & $ 1.019$\phantom{)} & $ 0.990$\phantom{)} & $ 0.985$\phantom{)} \\
 &  & (0.145) & (0.150) & (0.150) \\
 & \code{dyslexia} & $-0.638$\phantom{)} & $-0.610$\phantom{)} & $-0.603$\phantom{)} \\
 &  & (0.145) & (0.150) & (0.150) \\
 & \code{iq} & $ 0.690$\phantom{)} & $ 0.700$\phantom{)} & $ 0.707$\phantom{)} \\
 &  & (0.127) & (0.133) & (0.133) \\
 & \code{dyslexia:iq} & $-0.776$\phantom{)} & $-0.786$\phantom{)} & $-0.784$\phantom{)} \\
 &  & (0.127) & (0.133) & (0.133) \\ \hline
Precision & (Intercept) & $ 3.040$\phantom{)} & $ 2.811$\phantom{)} & $ 2.721$\phantom{)} \\
 &  & (0.258) & (0.257) & (0.256) \\
 & \code{dyslexia} & $ 1.768$\phantom{)} & $ 1.705$\phantom{)} & $ 1.634$\phantom{)} \\
 &  & (0.258) & (0.257) & (0.256) \\
 & \code{iq} & $ 1.437$\phantom{)} & $ 1.370$\phantom{)} & $ 1.281$\phantom{)} \\
 &  & (0.257) & (0.257) & (0.257) \\
 & \code{dyslexia:iq} & $-0.611$\phantom{)} & $-0.668$\phantom{)} & $-0.759$\phantom{)} \\
 &  & (0.257) & (0.257) & (0.257) \\ \hline
Log-likelihood &  & $66.734$\phantom{)} & $66.334$\phantom{)} & $66.134$\phantom{)} \\ \hline

> pr_phi <- sapply(list(`Maximum likelihood` = rs_ml, 
+     `Bias correction` = rs_bc, `Bias reduction` = rs_br), predict, 
+     type = "precision")

> pairs(log(pr_phi), panel = function(x, y, ...) {
+     panel.smooth(x, y, ...)
+     abline(0, 1, lty = 2)
+ })

> set.seed(1071)

> n <- nrow(ReadingSkills)

> ReadingSkills$x1 <- rnorm(n)

> ReadingSkills$x2 <- runif(n)

> ReadingSkills$x3 <- factor(sample(0:1, n, replace = TRUE))

> if (cache & file.exists("betareg-ext-betatree.rda")) {
+     load("betareg-ext-betatree.rda")
+ } else {
+     rs_tree <- betatree(accuracy ~ iq | i .... [TRUNCATED] 

> plot(rs_tree)

> plot(rs_tree)

> coef(rs_tree)
  (Intercept)          iq (phi)_(Intercept)  (phi)_iq
2   1.6565251  1.46570750          1.272597 2.0478577
3   0.3809322 -0.08622808          4.807662 0.8260329

> rs_tree
Beta regression tree

Model formula:
accuracy ~ iq + iq | dyslexia + x1 + x2 + x3

Fitted party:
[1] root
|   [2] dyslexia in no: n = 25
|             (Intercept)                iq (phi)_(Intercept) 
|                1.656525          1.465708          1.272597 
|                (phi)_iq 
|                2.047858 
|   [3] dyslexia in yes: n = 19
|             (Intercept)                iq (phi)_(Intercept) 
|              0.38093218       -0.08622808        4.80766206 
|                (phi)_iq 
|              0.82603290 

Number of inner nodes:    1
Number of terminal nodes: 2
Number of parameters per node: 4
Objective function (negative log-likelihood): 66.73409

> 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(rs_tree)

  When sourcing 'betareg-ext.R':
Error: no applicable method for ‘estfun’ applied to an object of class "c('betatree', 'modelparty', 'party')"
Execution halted