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

> ### Name: bayesCox
> ### Title: Fit Bayesian Cox Model for Interval Censored Survival Data
> ### Aliases: bayesCox
> ### Keywords: Bayesian Cox censor dynamic interval
> 
> ### ** Examples
> 
> library(dynsurv)
> set.seed(1216)
> 
> ## breast cancer data
> data(bcos)
> mydata <- bcos
> myformula <- Surv(left, right, type = "interval2") ~ trt
> 
> ### Fit time-independent coefficient model
> fit0 <- bayesCox(myformula, mydata, model = "TimeIndep",
+                  base.prior = list(type = "Gamma", shape = 0.1, rate = 0.1),
+                  coef.prior = list(type = "Normal", mean = 0, sd = 1),
+                  gibbs = list(iter = 100, burn = 20, thin = 1, verbose = FALSE))
> 
> ## plot coefficient estimates
> plotCoef(coef(fit0, level = 0.9))
> 
> ## Plot the estimated survival function for given new data
> newDat <- data.frame(trt = c("Rad", "RadChem"))
> row.names(newDat) <- unique(newDat$trt)
> plotSurv(survCurve(fit0, newDat), conf.int = TRUE)
> 
> ### Fit time-varying coefficient model
> fit1 <- bayesCox(myformula, mydata, model = "TimeVary",
+                  base.prior = list(type = "Gamma", shape = 0.1, rate = 0.1),
+                  coef.prior = list(type = "AR1", sd = 1),
+                  gibbs = list(iter = 100, burn = 20, thin = 1,
+                               verbose = TRUE, nReport = 20))
Iteration(0)
Iteration(20)
Iteration(40)
Iteration(60)
Iteration(80)
> 
> plotCoef(coef(fit1))
> plotSurv(survCurve(fit1), conf.int = TRUE)
> 
> ### Fit dynamic coefficient model with time-varying baseline hazards
> fit2 <- bayesCox(myformula, mydata, model = "Dynamic",
+                  base.prior = list(type = "Gamma", shape = 0.1, rate = 0.1),
+                  coef.prior = list(type = "HAR1", shape = 2, scale = 1),
+                  gibbs = list(iter = 100, burn = 20, thin = 1,
+                               verbose = TRUE, nReport = 20))
Iteration(0)
Iteration(20)
Iteration(40)
Iteration(60)

 *** caught segfault ***
address 91c9f820, cause 'memory not mapped'

Traceback:
 1: bayesCox(myformula, mydata, model = "Dynamic", base.prior = list(type = "Gamma",     shape = 0.1, rate = 0.1), coef.prior = list(type = "HAR1",     shape = 2, scale = 1), gibbs = list(iter = 100, burn = 20,     thin = 1, verbose = TRUE, nReport = 20))
An irrecoverable exception occurred. R is aborting now ...