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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: mpr
> ### Title: Fitting a Multi-Parameter Regression (MPR) model.
> ### Aliases: mpr print.mpr
> 
> ### ** Examples
> 
> # Veterans' administration lung cancer data
> data(veteran, package="survival")
> head(veteran)
  trt celltype time status karno diagtime age prior
1   1 squamous   72      1    60        7  69     0
2   1 squamous  411      1    70        5  64    10
3   1 squamous  228      1    60        3  38     0
4   1 squamous  126      1    60        9  63    10
5   1 squamous  118      1    70       11  65    10
6   1 squamous   10      1    20        5  49     0
> 
> # treatment variable, "trt", in scale (lambda) and shape (gamma)
> # components of a Weibull model
> mpr(Surv(time, status) ~ list(~ trt, ~ trt), data=veteran, family="Weibull")
Call:
mpr(formula = Surv(time, status) ~ list(~trt, ~trt), data = veteran, 
    family = "Weibull")

Model:
  family npar   loglike      aic      bic code
 Weibull    4 -746.4009 1500.802 1512.482    1

Coefficients:
Beta:
(Intercept).b         trt.b 
    -5.834906      1.088528 
Alpha:
(Intercept).a         trt.a 
    0.2342806    -0.2489165 
> 
> # same as first model
> mpr(Surv(time, status) ~ trt, data=veteran, family="Weibull")
Call:
mpr(formula = Surv(time, status) ~ trt, data = veteran, family = "Weibull")

Model:
  family npar   loglike      aic      bic code
 Weibull    4 -746.4009 1500.802 1512.482    1

Coefficients:
Beta:
(Intercept).b         trt.b 
    -5.834906      1.088528 
Alpha:
(Intercept).a         trt.a 
    0.2342806    -0.2489165 
> 
> # now with "celltype" also appearing in the scale
> mpr(Surv(time, status) ~ list(~ trt + celltype, ~ trt), data=veteran,
+     family="Weibull")
Call:
mpr(formula = Surv(time, status) ~ list(~trt + celltype, ~trt), 
    data = veteran, family = "Weibull")

Model:
  family npar   loglike      aic      bic code
 Weibull    7 -733.3292 1480.658 1501.098    1

Coefficients:
Beta:
      (Intercept).b               trt.b celltypesmallcell.b     celltypeadeno.b 
         -6.4795211           0.7924396           1.0745598           1.1406392 
    celltypelarge.b 
          0.2596420 
Alpha:
(Intercept).a         trt.a 
    0.1708793    -0.1291199 
> 
> # trt in scale only (this is a PH Weibull model)
> mpr(Surv(time, status) ~ list(~ trt, ~ 1), data=veteran, family="Weibull")
Call:
mpr(formula = Surv(time, status) ~ list(~trt, ~1), data = veteran, 
    family = "Weibull")

Model:
  family npar   loglike     aic     bic code
 Weibull    3 -748.0648 1502.13 1510.89    1

Coefficients:
Beta:
(Intercept).b         trt.b 
   -4.0296372    -0.0408242 
Alpha:
(Intercept).a 
   -0.1585193 
> 
> # trt in all three components (scale and two shape parameters) of a Burr model
> mpr(Surv(time, status) ~ list(~ trt, ~ trt, ~ trt), data=veteran,
+     family="Burr")
Call:
mpr(formula = Surv(time, status) ~ list(~trt, ~trt, ~trt), data = veteran, 
    family = "Burr")

Model:
 family npar   loglike      aic      bic code
   Burr    6 -744.8043 1501.609 1519.129    1

Coefficients:
Beta:
(Intercept).b         trt.b 
   -4.9503349     0.2039591 
Alpha:
(Intercept).a         trt.a 
  -0.08523452    0.07059845 
Tau:
(Intercept).t         trt.t 
    -40.83981      20.16621 
> 
> # use of summary
> mod1 <- mpr(Surv(time, status) ~ list(~ trt, ~ trt), data=veteran)
> summary(mod1)
Call:
mpr(formula = Surv(time, status) ~ list(~trt, ~trt), data = veteran)

Model:
  family npar   loglike      aic      bic code
 Weibull    4 -746.4009 1500.802 1512.482    1

Coefficients:
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
mpr
 --- call from context --- 
print.summary.mpr(x)
 --- call from argument --- 
if (class(x$overallpmat) == "matrix") {
    printCoefmat(x$coefmat, P.values = TRUE, has.Pvalue = TRUE, 
        signif.legend = FALSE)
    cat("---\nOverall:\n")
    printCoefmat(x$overallpmat, P.values = TRUE, has.Pvalue = TRUE)
} else {
    printCoefmat(x$coefmat, P.values = TRUE, has.Pvalue = TRUE)
}
 --- R stacktrace ---
where 1: print.summary.mpr(x)
where 2: (function (x, ...) 
UseMethod("print"))(x)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (x, ...) 
{
    cat("Call:\n")
    print(x$call)
    cat("\nModel:\n")
    print(x$model)
    cat("\nCoefficients:\n")
    if (class(x$overallpmat) == "matrix") {
        printCoefmat(x$coefmat, P.values = TRUE, has.Pvalue = TRUE, 
            signif.legend = FALSE)
        cat("---\nOverall:\n")
        printCoefmat(x$overallpmat, P.values = TRUE, has.Pvalue = TRUE)
    }
    else {
        printCoefmat(x$coefmat, P.values = TRUE, has.Pvalue = TRUE)
    }
}
<bytecode: 0x56552392e9d8>
<environment: namespace:mpr>
 --- function search by body ---
Function print.summary.mpr in namespace mpr has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1