The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Package {basil}


Type: Package
Title: Survival Prediction for Severe Limb Ischaemia (BASIL Model)
Version: 0.1.0
Description: Predicts survival for patients with severe limb ischaemia using the prognostic model developed from the Bypass versus Angioplasty in Severe Ischaemia of the Leg (BASIL) trial (Bradbury and others (2010) <doi:10.1016/j.jvs.2010.01.077>). The model is an accelerated failure time Weibull regression. The package is intended for research and audit; it is not a substitute for clinical judgement and its predictions should not be used as the sole basis for clinical decisions.
License: MIT + file LICENSE
Encoding: UTF-8
URL: https://github.com/chrislongros/basil
BugReports: https://github.com/chrislongros/basil/issues
Suggests: tinytest
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-07-07 14:34:36 UTC; chris
Author: Christos Longros ORCID iD [aut, cre], Nikolaos Papatheodorou ORCID iD [aut]
Maintainer: Christos Longros <chris.longros@gmail.com>
Repository: CRAN
Date/Publication: 2026-07-16 13:00:12 UTC

BASIL predicted survival

Description

Predicts the probability of survival at one or more time points for a patient with severe limb ischaemia, using the BASIL trial survival prediction model (Bradbury and others, 2010). The model is an accelerated failure time Weibull regression; coefficients are those of the official BASIL prognostic spreadsheet.

Usage

basil(
  age,
  tissue_loss,
  bmi,
  creatinine,
  bollinger,
  smoking,
  mi_angina,
  stroke_tia,
  ankle_pressures_n,
  max_ankle_pressure,
  times = c(0.5, 1, 2),
  shrunk = TRUE
)

Arguments

age

Age in years (clamped to 40-95).

tissue_loss

Logical; tissue loss present.

bmi

Body mass index category: "<20", "20-25", "25-30", "30+" or "unknown".

creatinine

Serum creatinine category: "low", "medium", "high" or "missing".

bollinger

Below-knee Bollinger angiogram score category: "<5", ">=5" or "unknown".

smoking

Smoking status: "non", "ex" or "current".

mi_angina

Logical; history of myocardial infarction or angina.

stroke_tia

Logical; history of stroke or transient ischaemic attack.

ankle_pressures_n

Number of below-knee ankle pressures measurable (0, 1, 2 or 3).

max_ankle_pressure

Maximum ankle pressure obtained, mmHg (clamped to 0-200).

times

Numeric vector of times in years at which to return survival (default 0.5, 1 and 2).

shrunk

Logical; if TRUE (default) apply the model's uniform shrinkage, as in the trial's primary output.

Details

Two composite variables are entered as categories rather than raw values, because their derivations are not fully specified in the spreadsheet: creatinine as "low", "medium", "high" or "missing", and bollinger (the below-knee Bollinger angiogram score) as "<5", ">=5" or "unknown". Age is clamped to 40-95 and maximum ankle pressure to 0-200, as in the deployed model.

Value

A named numeric vector of survival probabilities at times, with the linear predictor attached as attribute "lp".

Examples

# The BASIL spreadsheet's worked example
basil(age = 80, tissue_loss = TRUE, bmi = "30+", creatinine = "medium",
      bollinger = "<5", smoking = "ex", mi_angina = TRUE, stroke_tia = TRUE,
      ankle_pressures_n = 0, max_ankle_pressure = 0)

Categorise a serum creatinine value for BASIL

Description

Maps a raw serum creatinine value to the category used by the creatinine argument of basil. The cut points are those of the BASIL model (Bradbury and others, 2010): below 88, 88-115, and above 115 \mumol/L for low, medium and high, respectively.

Usage

basil_creatinine_category(x, units = c("umol", "mgdl"))

Arguments

x

Numeric vector of serum creatinine values. NA maps to "missing".

units

Units of x: "umol" (micromoles per litre, the default) or "mgdl" (milligrams per decilitre, converted to \mumol/L at 1 mg/dL = 88.4 \mumol/L before categorising).

Value

A character vector of "low", "medium", "high" or "missing", suitable for the creatinine argument of basil.

Examples

basil_creatinine_category(c(70, 100, 130, NA))
basil_creatinine_category(1.5, units = "mgdl")  # 1.5 mg/dL -> 132.6 umol/L -> "high"

BASIL predicted survival for a cohort

Description

Applies basil to each row of a data frame, appending the linear predictor and the predicted survival at each of times as columns.

Usage

basil_risk(data, times = c(0.5, 1, 2), shrunk = TRUE)

Arguments

data

A data frame with one row per patient and columns age, tissue_loss, bmi, creatinine, bollinger, smoking, mi_angina, stroke_tia, ankle_pressures_n and max_ankle_pressure.

times

Numeric vector of times in years (default 0.5, 1 and 2).

shrunk

Logical; passed to basil.

Value

data with an lp column and one surv_t<time> column for each entry in times.

Examples

patients <- data.frame(
    age = c(80, 65), tissue_loss = c(TRUE, FALSE),
    bmi = c("30+", "20-25"), creatinine = c("medium", "low"),
    bollinger = c("<5", ">=5"), smoking = c("ex", "non"),
    mi_angina = c(TRUE, FALSE), stroke_tia = c(TRUE, FALSE),
    ankle_pressures_n = c(0, 2), max_ankle_pressure = c(0, 80))
basil_risk(patients)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.