eq5d_profile_pchc_by_group_plot: eq5d_profile_pchc_by_group_plot: Paretian Classification of...

eq5d_profile_pchc_by_group_plotR Documentation

eq5d_profile_pchc_by_group_plot: Paretian Classification of Health Change (PCHC) by Group This function computes PCHC categories between two time points for each subject, stratifies them by a grouping variable, and produces a single bar chart with side-by-side bars showing the distribution of PCHC categories.

Description

eq5d_profile_pchc_by_group_plot: Paretian Classification of Health Change (PCHC) by Group This function computes PCHC categories between two time points for each subject, stratifies them by a grouping variable, and produces a single bar chart with side-by-side bars showing the distribution of PCHC categories.

Usage

eq5d_profile_pchc_by_group_plot(
  df,
  name_id,
  name_groupvar = NULL,
  names_eq5d = NULL,
  name_fu = NULL,
  levels_fu = NULL
)

Arguments

df

Data frame containing EQ-5D dimensions, a grouping variable, patient ID, and follow-up columns

name_id

Character string for the patient ID column

name_groupvar

Character string for the grouping column (e.g., procedure). If NULL (default), the analysis is performed on the full population.

names_eq5d

Character vector of column names for the EQ-5D dimensions

name_fu

Character string for the follow-up column

levels_fu

Character vector of length 2 indicating the order of follow-up time points (e.g., c("Pre-op", "Post-op"))

Value

A list with two elements:

plot_data

A tibble of PCHC percentages by group

p

A ggplot2 object showing a bar chart with side-by-side bars for each PCHC category

Examples

result <- eq5d_profile_pchc_by_group_plot(
  df = example_data,
  name_id = "id",
  name_groupvar = "procedure",
  names_eq5d = c("mo", "sc", "ua", "pd", "ad"),
  name_fu = "time",
  levels_fu = c("Pre-op", "Post-op")
)
result$p        # shows the plot
result$plot_data  # shows the summary table

eq5dsuite documentation built on May 14, 2026, 5:07 p.m.