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

> ### Name: plot PredTrialTContCont
> ### Title: Plots the expected treatment effect on the true endpoint in a
> ###   new trial (when both S and T are normally distributed continuous
> ###   endpoints)
> ### Aliases: 'plot PredTrialTContCont' plot.PredTrialTContCont
> ### Keywords: New trial Predict treatment effect T
> 
> ### ** Examples
> 
> # Generate dataset
> Sim.Data.MTS(N.Total=2000, N.Trial=15, R.Trial.Target=.95, 
+ R.Indiv.Target=.8, D.aa=10, D.bb=50, 
+ Fixed.Effects=c(1, 2, 30, 90), Seed=1)

NOTE: The number of patients per trial requested in the function call equals 133.33 (=N.Total/N.Trial), which is not a whole number. 
The number of patients per trial was rounded to 134 to generate the dataset. Data.Observed.MTS thus contains a total of 2010 patients 
rather than the requested 2000 in the function call.> 
> # Evaluate surrogacy using a reduced bivariate mixed-effects model
> BimixedFit <- BimixedContCont(Dataset = Data.Observed.MTS, 
+ Surr = Surr, True = True, Treat = Treat, Trial.ID = Trial.ID, 
+ Pat.ID = Pat.ID, Model="Reduced")

 *** caught segfault ***
address 11260371, cause 'memory not mapped'

Traceback:
 1: recalc.corSymm(object[[i]], conLin)
 2: recalc(object[[i]], conLin)
 3: recalc.modelStruct(object, conLin)
 4: recalc(object, conLin)
 5: logLik.lmeStruct(lmeSt, lmePars)
 6: logLik(lmeSt, lmePars)
 7: objective(.par, ...)
 8: nlminb(c(coef(lmeSt)), function(lmePars) -logLik(lmeSt, lmePars),     control = control)
 9: lme.formula(outcome ~ -1 + as.factor(endpoint):Treat + as.factor(endpoint),     random = ~-1 + as.factor(endpoint):Treat | as.factor(Trial.ID),     correlation = nlme::corSymm(form = ~1 | as.factor(Trial.ID)/as.factor(Pat.ID)),     data = Data.analyze, weights = nlme::varIdent(form = ~1 |         endpoint), control = list(msVerbose = FALSE, optimizer = "nlm",         niterEM = 25, msMaxIter = 500))
10: lme(outcome ~ -1 + as.factor(endpoint):Treat + as.factor(endpoint),     random = ~-1 + as.factor(endpoint):Treat | as.factor(Trial.ID),     correlation = nlme::corSymm(form = ~1 | as.factor(Trial.ID)/as.factor(Pat.ID)),     data = Data.analyze, weights = nlme::varIdent(form = ~1 |         endpoint), control = list(msVerbose = FALSE, optimizer = "nlm",         niterEM = 25, msMaxIter = 500))
11: BimixedContCont(Dataset = Data.Observed.MTS, Surr = Surr, True = True,     Treat = Treat, Trial.ID = Trial.ID, Pat.ID = Pat.ID, Model = "Reduced")
An irrecoverable exception occurred. R is aborting now ...