Last updated on 2026-10-24 12:51:38 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.9-4 | 103.38 | 424.39 | 527.77 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.9-4 | 65.36 | 243.62 | 308.98 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 1.9-4 | 68.00 | 291.21 | 359.21 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.9-4 | 73.00 | 273.81 | 346.81 | OK | |
| r-devel-windows-x86_64 | 1.9-4 | 107.00 | 489.00 | 596.00 | OK | |
| r-patched-linux-x86_64 | 1.9-4 | 104.16 | 408.71 | 512.87 | OK | |
| r-release-linux-x86_64 | 1.9-4 | 97.57 | 410.72 | 508.29 | OK | |
| r-release-macos-arm64 | 1.9-4 | 23.00 | 90.00 | 113.00 | OK | |
| r-release-macos-x86_64 | 1.9-4 | 72.00 | 460.00 | 532.00 | OK | |
| r-release-windows-x86_64 | 1.9-4 | 110.00 | 433.00 | 543.00 | OK | |
| r-oldrel-macos-arm64 | 1.9-4 | OK | ||||
| r-oldrel-macos-x86_64 | 1.9-4 | 72.00 | 611.00 | 683.00 | OK | |
| r-oldrel-windows-x86_64 | 1.9-4 | 150.00 | 530.00 | 680.00 | OK |
Version: 1.9-4
Check: examples
Result: ERROR
Running examples in ‘mgcv-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: predict.gam
> ### Title: Prediction from fitted GAM model
> ### Aliases: predict.gam
> ### Keywords: models smooth regression
>
> ### ** Examples
>
> library(mgcv)
> n <- 200
> sig <- 2
> dat <- gamSim(1,n=n,scale=sig)
Gu & Wahba 4 term additive model
>
> b <- gam(y~s(x0)+s(I(x1^2))+s(x2)+offset(x3),data=dat)
>
> newd <- data.frame(x0=(0:30)/30,x1=(0:30)/30,x2=(0:30)/30,x3=(0:30)/30)
> pred <- predict.gam(b,newd)
> pred0 <- predict(b,newd,exclude="s(x0)") ## prediction excluding a term
> ## ...and the same, but without needing to provide x0 prediction data...
> newd1 <- newd;newd1$x0 <- NULL ## remove x0 from `newd1'
> pred1 <- predict(b,newd1,exclude="s(x0)",newdata.guaranteed=TRUE)
>
> ## custom perspective plot...
>
> m1 <- 20;m2 <- 30; n <- m1*m2
> x1 <- seq(.2,.8,length=m1);x2 <- seq(.2,.8,length=m2) ## marginal grid points
> df <- data.frame(x0=rep(.5,n),x1=rep(x1,m2),x2=rep(x2,each=m1),x3=rep(0,n))
> pf <- predict(b,newdata=df,type="terms")
> persp(x1,x2,matrix(pf[,2]+pf[,3],m1,m2),theta=-130,col="blue",zlab="")
>
> #############################################
> ## difference between "terms" and "iterms"
> #############################################
> nd2 <- data.frame(x0=c(.25,.5),x1=c(.25,.5),x2=c(.25,.5),x3=c(.25,.5))
> predict(b,nd2,type="terms",se=TRUE)
$fit
s(x0) s(I(x1^2)) s(x2)
1 -0.05203567 -1.4080075 5.8224469
2 0.46405199 -0.3019055 0.2471463
$se.fit
s(x0) s(I(x1^2)) s(x2)
1 0.1991066 0.12604172 0.5158322
2 0.1799396 0.02702592 0.3930834
attr(,"constant")
(Intercept)
6.836839
> predict(b,nd2,type="iterms",se=TRUE)
$fit
s(x0) s(I(x1^2)) s(x2)
1 -0.05203567 -1.4080075 5.8224469
2 0.46405199 -0.3019055 0.2471463
$se.fit
s(x0) s(I(x1^2)) s(x2)
1 0.2523494 0.1998081 0.5386275
2 0.2375185 0.1573759 0.4225534
attr(,"constant")
(Intercept)
6.836839
>
> #########################################################
> ## now get variance of sum of predictions using lpmatrix
> #########################################################
>
> Xp <- predict(b,newd,type="lpmatrix")
Error in offs[[1]] : subscript out of bounds
Calls: predict -> predict.gam
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc