compute_prop_surp: Proportion of Subjects Surpassing the Threshold

View source: R/compute_prop_surp.R

compute_prop_surpR Documentation

Proportion of Subjects Surpassing the Threshold

Description

Computes the proportion of subjects surpassing the threshold, either improvement or deterioration, in each anchor group. This can then be passed as a caption to the eCDF plot.

Usage

compute_prop_surp(
  dat = NULL,
  anchor.group = NULL,
  time.var = NULL,
  timepoint = NULL,
  change.score = NULL,
  mean.or.median = NULL,
  threshold.label = NULL
)

Arguments

dat

pass the dataframe

anchor.group

variable of the anchor group you want used here

time.var

variable of the Time in the dataframe - PLEASE CHECK THAT THIS IS CORRECTLY ORDERED, default is Time

timepoint

default here is to just use the final timepoint, e.g., "Time_4". Please be sure to have ordered your time variable correctly.

change.score

the PRO change score you want the threshold computed on

mean.or.median

pick a threshold type

threshold.label

optional numeric value, threshold to pass; default is default is "Improved_1" if "Improved" and "Deteriorated_1" if "Deteriorated"

threshold.type

character, either Improved or Deteriorated

Value

list containing a (1) a table of the proportion of subjects in each anchor group that surpass the threshold, and (2) a character vector to be optionally used as the caption in the eCDF plot


CJangelo/COA34 documentation built on June 23, 2022, 12:10 p.m.