fixcut_con {BioPred}R Documentation

Fixed Cutoff Analysis for Individual Biomarker Associated with Continuous Outcome

Description

This function conducts fixed cutoff analysis for individual biomarker associated with continuous outcome variables.

Usage

fixcut_con(
  yvar,
  xvar,
  dir,
  cutoffs,
  data,
  method = "t.test",
  yvar.display = yvar,
  xvar.display = xvar,
  vert.x = FALSE
)

Arguments

yvar

Continuous response variable name.

xvar

Biomarker name.

dir

Cutoff direction for the desired subgroup. Options are ">", ">=", "<", or "<=".

cutoffs

A vector of candidate cutoffs.

data

The dataset containing the variables.

method

Method for cutoff selection. Currently only supports "t.test". - "t.test": Minimizes the t-test p-value.

yvar.display

Display name of the response variable.

xvar.display

Display name of the predictor variable.

vert.x

Whether to display the cutoff in a 90-degree angle when plotting (saves space).

Value

A list containing statistical summaries, selected cutoff statistics, selected cutoff value, group statistics, and a ggplot object for visualization.

Examples

# Load a sample dataset
data <- data.frame(
  outcome = rnorm(100, mean = 10, sd = 5),
  biomarker = rnorm(100, mean = 0, sd = 1)
)

# Perform fixed cutoff analysis using the "t.test" method with '>' direction
fixcut_con(
  yvar = "outcome",
  xvar = "biomarker",
  dir = ">",
  cutoffs = seq(-2, 2, by = 0.5),
  data = data,
  method = "t.test",
  yvar.display = "Continuous Outcome",
  xvar.display = "Biomarker Level",
  vert.x = TRUE
)

# Perform fixed cutoff analysis with '<=' direction
fixcut_con(
  yvar = "outcome",
  xvar = "biomarker",
  dir = "<=",
  cutoffs = c(-1, 0, 1),
  data = data,
  method = "t.test",
  yvar.display = "Continuous Outcome",
  xvar.display = "Biomarker Level",
  vert.x = FALSE
)

[Package BioPred version 1.0.2 Index]