Errors in running code in vignettes:
when running code in 'treatReg.Rnw'

> library(sampleSelection)
Loading required package: maxLik
Loading required package: miscTools

Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.

If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/

> options(width = 70)

> set.seed(0)

> N <- 2000

> sigma <- 1

> rho <- 0.8

> Sigma <- matrix(c(1, rho * sigma, rho * sigma, sigma^2), 
+     2, 2)

> uv <- mvtnorm::rmvnorm(N, mean = c(0, 0), sigma = Sigma)

> u <- uv[, 1]

> v <- uv[, 2]

> x <- rnorm(N)

> z <- rnorm(N)

> ySX <- -1 + x + z + u

> yS <- ySX > 0

> yO <- x + yS + v

> dat <- data.frame(yO, yS, x, z)

> m <- lm(yO ~ x + yS, data = dat)

> print(summary(m))

Call:
lm(formula = yO ~ x + yS, data = dat)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.5146 -0.6649  0.0365  0.6754  2.6004 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.25460    0.02557  -9.956   <2e-16 ***
x            0.81027    0.02289  35.394   <2e-16 ***
ySTRUE       1.92569    0.05129  37.546   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.9332 on 1997 degrees of freedom
Multiple R-squared:  0.7054,	Adjusted R-squared:  0.7052 
F-statistic:  2391 on 2 and 1997 DF,  p-value: < 2.2e-16


> tm <- treatReg(yS ~ x + z, yO ~ x + yS, data = dat)

> print(summary(tm))
--------------------------------------------
Tobit treatment model (switching regression model)
Maximum Likelihood estimation
Newton-Raphson maximisation, 3 iterations
Return code 1: gradient close to zero (gradtol)
Log-Likelihood: -3254.356 
2000 observations: 1419 non-participants (selection FALSE) and 581
 participants (selection TRUE)

8 free parameters (df = 1992)
Probit selection equation:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -1.02120    0.04376  -23.34   <2e-16 ***
x            1.01973    0.04555   22.39   <2e-16 ***
z            1.05186    0.04651   22.62   <2e-16 ***
Outcome equation:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.01565    0.02943   0.532    0.595    
x            0.99599    0.02569  38.769   <2e-16 ***
ySTRUE       0.98779    0.06571  15.033   <2e-16 ***
   Error terms:
      Estimate Std. Error t value Pr(>|t|)    
sigma  1.00761    0.01888   53.38   <2e-16 ***
rho    0.81050    0.02385   33.98   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
--------------------------------------------

> data(Treatment, package = "Ecdat")

  When sourcing 'treatReg.R':
Error: there is no package called 'Ecdat'
Execution halted

  'intReg.Rnw' using 'UTF-8'... OK
  'selection.Rnw' using 'UTF-8'... OK
  'treatReg.Rnw' using 'UTF-8'... failed