tabforest_demo: Demonstration data for tabforest()

tabforest_demoR Documentation

Demonstration data for tabforest()

Description

A simulated health-research dataset designed specifically for the worked examples in tabforest(). It contains binary, continuous, count, and time-to-event outcomes, together with continuous and categorical predictors. A small amount of missing data is intentional so users can compare sample = "common" and sample = "model".

Usage

data(tabforest_demo)

Format

A data frame with 500 rows and 19 variables:

id

Participant identifier.

age

Age in years.

sex

Sex: Female or Male.

bmi

Body mass index in kg/m2.

smoking

Current smoking: No or Yes.

alcohol

Current alcohol use: No or Yes.

education

Primary, Secondary, or College.

treatment

Control or Intervention.

hypertension

Binary outcome: No or Yes.

depression

Binary prevalence outcome: No or Yes.

sbp

Systolic blood pressure in mmHg; continuous outcome.

visits

Number of healthcare visits; count outcome.

followup

Follow-up time in years.

death

Survival event indicator: 0=censored, 1=death.

hospital

Hospital cluster identifier H1-H5.

age_group

Age group: <55 or >=55 years.

obesity

Demo obesity grouping: No or Yes (BMI >=27.5 for teaching only).

diabetes

Simulated diabetes mellitus: No or Yes.

dyslipidemia

Simulated dyslipidemia: No or Yes.

Details

The dataset is entirely simulated and contains no real patient information. It is intended for package examples, teaching, testing, and screenshots.

Source

Simulated by R4VN for reproducible examples; seed 20260813.

Examples

data(tabforest_demo)
str(tabforest_demo)
table(tabforest_demo$hypertension, useNA = "ifany")
summary(tabforest_demo$sbp)

# A CSV copy is also installed for teaching/import demonstrations.
p <- system.file("extdata", "tabforest_demo.csv", package = "R4VN")
p

R4VN documentation built on Sept. 30, 2026, 5:13 p.m.