Last updated on 2026-10-24 20:51:09 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.9 | 454.46 | 84.29 | 538.75 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.9 | 311.19 | 49.55 | 360.74 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 1.1.9 | 264.00 | 70.49 | 334.49 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.9 | 343.00 | 51.99 | 394.99 | OK | |
| r-devel-windows-x86_64 | 1.1.9 | 450.00 | 205.00 | 655.00 | OK | |
| r-patched-linux-x86_64 | 1.1.9 | 426.50 | 73.22 | 499.72 | OK | |
| r-release-linux-x86_64 | 1.1.9 | 393.16 | 74.79 | 467.95 | OK | |
| r-release-macos-arm64 | 1.1.9 | 81.00 | -42.00 | 39.00 | OK | |
| r-release-macos-x86_64 | 1.1.9 | 232.00 | -36.00 | 196.00 | OK | |
| r-release-windows-x86_64 | 1.1.9 | 454.00 | 140.00 | 594.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.9 | OK | ||||
| r-oldrel-macos-x86_64 | 1.1.9 | 216.00 | -38.00 | 178.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.9 | 534.00 | 158.00 | 692.00 | OK |
Version: 1.1.9
Check: examples
Result: ERROR
Running examples in ‘spBayesSurv-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: SpatDensReg
> ### Title: Bayesian Nonparametric Spatially Smoothed Density Estimation
> ### Aliases: SpatDensReg BF.SpatDensReg print.SpatDensReg
> ### summary.SpatDensReg print.summary.SpatDensReg
>
> ### ** Examples
>
> ## Simulated data
> rm(list=ls())
> library(survival)
> library(spBayesSurv)
> library(coda)
>
> ## True conditional density
> fiofy_x = function(y, x){
+ 0.5*dnorm(y, -x, 1)+0.5*dnorm(y, x, 1);
+ }
>
> ## Generate data
> n = 200;
> x = runif(n, 0, 3)
> y = rep(0, n);
> uu = runif(n);
> for(i in 1:n){
+ if(uu[i]<0.5){
+ y[i] = rnorm(1, -x[i], 1);
+ }else{
+ y[i] = rnorm(1, x[i], 1);
+ }
+ }
>
> ## right censored
> y1=y;y2=y;
> Centime = runif(n, 2, 4);
> delta = (y<=Centime) +0 ;
> length(which(delta==0))/n; ## censoring rate
[1] 0.09
> rcen = which(delta==0);
> y1[rcen] = Centime[rcen];
> y2[rcen] = NA;
> ## make a data frame
> ## Method 1: in the interval-censoring notation:
> ## y1 is the left endpoint and y2 is the right endpoint.
> ## This way we could use Surv(y1, y2, type="interval2")
> ## Method 2: Because we have right-censored data,
> ## we could use y1 as the observed survival times and delta as the indicator.
> ## This way we could use Surv(y1, delta). This is the same as above.
> d = data.frame(y1=y1, y2=y2, x=x, delta=delta);
>
> ##-------------fit the model-------------------##
> # MCMC parameters
> nburn=50; nsave=50; nskip=0;
> # Note larger nburn, nsave and nskip should be used in practice.
> mcmc=list(nburn=nburn, nsave=nsave, nskip=nskip, ndisplay=50);
> prior = list(maxL=4, phiq0=0);
> # Note please set 0<phiq0<1 for a valid Bayes factor of testing
> # spatial model vs. exchangeable model.
> # If the Bayes factor is not needed, setting phiq0=0 will speed up
> # the computing time about seven times.
> state = list(alpha=1);
> ptm<-proc.time()
> res1 = SpatDensReg(formula = Surv(y1, delta)~x, data=d,
+ prior=prior, state=state, mcmc=mcmc, permutation = TRUE,
+ fix.theta=FALSE);
scan = 50
> ## Or equivalently formula = Surv(y1, y2, type="interval2") can also be used.
> sfit=summary(res1); sfit
Spatially Smoothed Polya Tree Density Estimation:
Call:
SpatDensReg(formula = Surv(y1, delta) ~ x, data = d, prior = prior,
state = state, mcmc = mcmc, permutation = TRUE, fix.theta = FALSE)
Posterior inference of centering distribution parameters
(Adaptive M-H acceptance rate: 0.2):
Mean Median Std. Dev. 95%CI-Low 95%CI-Upp
location -0.08962 0.02723 0.20576 -0.35765 0.20933
log(scale) 0.74011 0.74093 0.06202 0.63048 0.80902
Posterior inference of precision parameter
(Adaptive M-H acceptance rate: 0.4):
Mean Median Std. Dev. 95%CI-Low 95%CI-Upp
alpha 0.8219 0.7598 0.3448 0.3165 1.4660
Posterior inference of distance function range phi
(Adaptive M-H acceptance rate: 0.12):
Mean Median Std. Dev. 95%CI-Low 95%CI-Upp
range 1.6590 1.5926 0.5135 1.2082 3.1984
Bayes Factor for the spatial model vs. the exchangeable model: NaN
Number of subjects: n=200
> systime1=proc.time()-ptm; systime1;
user system elapsed
0.849 0.045 0.917
> traceplot(mcmc(res1$theta[1,]))
> traceplot(mcmc(res1$theta[2,]))
> traceplot(mcmc(res1$alpha))
> traceplot(mcmc(res1$phi))
>
> ## plots
> ygrid = seq(-6, 6,length.out=100);
> xpred = data.frame(x=c(0,1,2,3));
> plot(res1, xnewdata=xpred, ygrid=ygrid);
Error in a$specials[[i]] : subscript out of bounds
Calls: plot -> plot.SpatDensReg -> delete.response -> off
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc