Helper Functions for Subgroup Treatment Effect Pattern (STEP) Calculations
Source:R/h_step.R
      h_step.RdUsage
h_step_window(x, control = control_step())
h_step_trt_effect(data, model, variables, x)
h_step_survival_formula(variables, control = control_step())
h_step_survival_est(
  formula,
  data,
  variables,
  x,
  subset = rep(TRUE, nrow(data)),
  control = control_coxph()
)
h_step_rsp_formula(variables, control = c(control_step(), control_logistic()))
h_step_rsp_est(
  formula,
  data,
  variables,
  x,
  subset = rep(TRUE, nrow(data)),
  control = control_logistic()
)Arguments
- x
 (
numeric) biomarker value(s) to use (withoutNA).- control
 (named
list) fromcontrol_step().- data
 (
data.frame)
the dataset containing the variables to summarize.- model
 the regression model object.
- variables
 (named
listofstring)
list of additional analysis variables.- formula
 (
formula)
the regression model formula.- subset
 (
logical)
subset vector.
Functions
h_step_window(): creates the windows for STEP, based on the control settings provided. Returns a list containing the window-selection matrixseland the interval information matrixinterval.h_step_trt_effect(): calculates the estimated treatment effect estimate on the linear predictor scale and corresponding standard error from a STEPmodelfitted ondatagivenvariablesspecification, for a single biomarker valuex. This works for bothcoxphandglmmodels, i.e. for calculating log hazard ratio or log odds ratio estimates. It returns a vector with elementsestandse.h_step_survival_formula(): builds the model formula used in survival STEP calculations.h_step_survival_est(): estimates the model withformulabuilt based onvariablesindatafor a givensubsetandcontrolparameters for the Cox regression, and returns a matrix of number of observationsn,eventsas well as log hazard ratio estimatesloghr, standard errorseand Wald confidence interval boundsci_lowerandci_upper. One row is included here for each biomarker value inx.h_step_rsp_formula(): builds the model formula used in response STEP calculations.h_step_rsp_est(): estimates the model withformulabuilt based onvariablesindatafor a givensubsetandcontrolparameters for the logistic regression, and returns a matrix of number of observationsnas well as log odds ratio estimateslogor, standard errorseand Wald confidence interval boundsci_lowerandci_upper. One row is included here for each biomarker value inx.