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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: GoldSilver
> ### Title: Gold and Silver Prices
> ### Aliases: GoldSilver
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data("GoldSilver", package = "AER")
> 
> ## p.31, daily returns
> lgs <- log(GoldSilver)
> plot(lgs[, c("silver", "gold")])
> 
> dlgs <- 100 * diff(lgs) 
> plot(dlgs[, c("silver", "gold")])
> 
> ## p.31, monthly log prices
> lgs7812 <- window(lgs, start = as.Date("1978-01-01"))
> lgs7812m <- aggregate(lgs7812, as.Date(as.yearmon(time(lgs7812))), mean)
> plot(lgs7812m, plot.type = "single", lty = 1:2, lwd = 2)
> 
> ## p.93, empirical ACF of absolute daily gold returns, 1978-01-01 - 2012-12-31
> absgret <- abs(100 * diff(lgs7812[, "gold"]))
> sacf <- acf(absgret, lag.max = 200, na.action = na.exclude, plot = FALSE)
> plot(1:201, sacf$acf, ylim = c(0.04, 0.28), type = "l", xaxs = "i", yaxs = "i", las = 1)
> 
> ## ARFIMA(0,1,1) model, eq. (4.44)
> library("longmemo")
> WhittleEst(absgret, model = "fARIMA", p = 0, q = 1, start = list(H = 0.3, MA = .25))
'WhittleEst' Whittle estimator for  fractional ARIMA ('fARIMA');	 call:
WhittleEst(x = absgret, model = "fARIMA", p = 0, q = 1, start = list(H = 0.3, 
    MA = 0.25))
ARMA order (p=0, q=1); 	  time series of length  n = 9130.

H = 0.8221219
coefficients 'eta' =
      Estimate  Std. Error   z value   Pr(>|z|)
H   0.82212189  0.01703983  48.24707 < 2.22e-16
MA -0.26559749  0.02096396 -12.66924 < 2.22e-16
 <==> d := H - 1/2 = 0.322 (0.017)

 $ vcov       : num [1:2, 1:2] 0.00029 -0.000313 -0.000313 0.000439
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:2] "H" "MA"
  .. ..$ : chr [1:2] "H" "MA"
 $ periodogr.x:‘zoo’ series from 1978-01-04 to 1995-07-03
  Data: num [1:4564] 52.12 4.29 4.45 9.9 4.59 ...
  Index:  Date[1:4564], format: "1978-01-04" "1978-01-05" ...
 $ spec       : num [1:4564, 1] 6.3 4.03 3.1 2.58 2.23 ...
> 
> library("forecast")
Error in library("forecast") : there is no package called ‘forecast’
Execution halted