Errors in running code in vignettes:
when running code in ‘sandwich-CL.Rnw’
  ...

> library("sandwich")

> library("geepack")

> library("lattice")

> library("lmtest")
Loading required package: zoo

Attaching package: ‘zoo’

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

    as.Date, as.Date.numeric


> library("multiwayvcov")

> library("pcse")

Attaching package: ‘pcse’

The following object is masked from ‘package:sandwich’:

    vcovPC


> library("plm")
Loading required package: Formula

> library("pscl")
Classes and Methods for R developed in the
Political Science Computational Laboratory
Department of Political Science
Stanford University
Simon Jackman
hurdle and zeroinfl functions by Achim Zeileis

> panel.xyref <- function(x, y, ...) {
+     panel.abline(h = 0.95, col = "slategray")
+     panel.xyplot(x, y, ...)
+ }

> se <- function(vcov) sapply(vcov, function(x) sqrt(diag(x)))

> options(prompt = "R> ", continue = "+  ", digits = 5)

> if (file.exists("sim-CL.rda")) {
+     load("sim-CL.rda")
+ } else {
+     source("sim-CL.R")
+ }

> data("InstInnovation", package = "sandwich")

> library("pscl")

> h_innov <- hurdle(cites ~ institutions + log(capital/employment) + 
+     log(sales), data = InstInnovation, dist = "negbin")

> library("sandwich")

> library("lmtest")

> coeftest(h_innov, vcov = vcovCL, cluster = ~company)

t test of coefficients:

                              Estimate Std. Error t value Pr(>|t|)    
count_(Intercept)              0.49025    0.89445    0.55   0.5836    
count_institutions             0.00397    0.00430    0.92   0.3567    
count_log(capital/employment)  0.30431    0.15214    2.00   0.0455 *  
count_log(sales)               0.38434    0.04999    7.69  1.7e-14 ***
zero_(Intercept)              -0.01007    0.26908   -0.04   0.9701    
zero_institutions              0.00658    0.00209    3.15   0.0016 ** 
zero_log(capital/employment)  -0.17431    0.06481   -2.69   0.0072 ** 
zero_log(sales)                0.17601    0.02776    6.34  2.5e-10 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


> se(vc_innov)
                               standard     basic      CL-1      boot
count_(Intercept)             0.2249894 0.6034277 0.8944541 0.8667209
count_institutions            0.0016022 0.0024664 0.0043029 0.0041135
count_log(capital/employment) 0.0546614 0.0817540 0.1521416 0.1494889
count_log(sales)              0.0126165 0.0322071 0.0499917 0.0612687
zero_(Intercept)              0.1460246 0.1530406 0.2690844 0.2791141
zero_institutions             0.0013508 0.0013473 0.0020870 0.0020777
zero_log(capital/employment)  0.0333649 0.0358768 0.0648053 0.0666365
zero_log(sales)               0.0164233 0.0165897 0.0277648 0.0295080

> data("PetersenCL", package = "sandwich")

> p_lm <- lm(y ~ x, data = PetersenCL)

> library("multiwayvcov")

> se(list(sandwich = vcovCL(p_lm, cluster = ~firm), 
+     multiwayvcov = cluster.vcov(p_lm, cluster = ~firm)))
            sandwich multiwayvcov
(Intercept) 0.067013     0.067013
x           0.050596     0.050596

> library("plm")

> p_plm <- plm(y ~ x, data = PetersenCL, model = "pooling", 
+     indexes = c("firm", "year"))

> library("geepack")

> vcov.geeglm <- function(object) {
+     vc <- object$geese$vbeta
+     rownames(vc) <- colnames(vc) <- names(coef(object))
+     return(vc)
+ }

> p_gee <- geeglm(y ~ x, data = PetersenCL, id = PetersenCL$firm, 
+     corstr = "independence", family = gaussian)

> se(list(sandwich = vcovCL(p_lm, cluster = ~firm, cadjust = FALSE, 
+     type = "HC0"), plm = vcovHC(p_plm, cluster = "group"), geepack = vcov(p_gee .... [TRUNCATED] 
            sandwich      plm  geepack
(Intercept) 0.066939 0.066939 0.066939
x           0.050540 0.050540 0.050540

> se(list(sandwich = vcovCL(p_lm, cluster = ~firm + 
+     year, multi0 = TRUE), multiwayvcov = cluster.vcov(p_lm, cluster = ~firm + 
+     year)))
            sandwich multiwayvcov
(Intercept) 0.065066     0.065066
x           0.053561     0.053561

> se(list(sandwich = vcovPL(p_lm, cluster = ~firm + 
+     year, adjust = FALSE), plm = vcovSCC(p_plm)))
            sandwich      plm
(Intercept) 0.024357 0.024357
x           0.028163 0.028163

> library("pcse")

> se(list(sandwich = sandwich::vcovPC(p_lm, cluster = ~firm + 
+     year), pcse = pcse::vcovPC(p_lm, groupN = PetersenCL$firm, 
+     groupT = Peters .... [TRUNCATED] 
            sandwich     pcse
(Intercept) 0.022201 0.022201
x           0.025276 0.025276

> PU <- subset(PetersenCL, !(firm == 1 & year == 10))

> pu_lm <- lm(y ~ x, data = PU)

> se(list(sandwichT = sandwich::vcovPC(pu_lm, cluster = ~firm + 
+     year, pairwise = TRUE), pcseT = pcse::vcovPC(pu_lm, PU$firm, 
+     PU$year, pa .... [TRUNCATED] 

  When sourcing ‘sandwich-CL.R’:
Error: replacement has 5000 rows, data has 4999
Execution halted