Skip to contents

Internal helper factoring out the part of dynamicPredictionBio()'s pipeline that does not depend on which biomarker (bio_i) is being predicted: restricting to at-risk patients, building the survival-side integration grid over \(T > \) prediction_time + horizon out to upper_bound (the prediction is conditional on survival through the time the biomarker is predicted at), dispatching to the Gaussian-copula conditional-density variants when needed (see predictRisk()), and evaluating the denominator conditional density (conditionalYT/conditionalYDT). dynamicPredictionBioAll() computes this once and reuses it across every requested biomarker, instead of recomputing it once per biomarker (including, under the copula path, its mvtnorm::pmvnorm() calls) the way calling dynamicPredictionBio() once per biomarker would.

Usage

compute_bio_shared_step(
  data_predict_all,
  long_fit_all,
  survival_fit_all,
  prediction_time,
  horizon,
  time_variable,
  survival_variable_all,
  survival_trans_function,
  bandcount2
)

Arguments

data_predict_all

See dynamicPredictionBio.

long_fit_all

See dynamicPredictionBio.

survival_fit_all

See dynamicPredictionBio.

prediction_time

See dynamicPredictionBio.

horizon

See dynamicPredictionBio.

time_variable

See dynamicPredictionBio.

survival_variable_all

See dynamicPredictionBio.

survival_trans_function

See dynamicPredictionBio.

bandcount2

See dynamicPredictionBio.

Value

A list with the pieces compute_bio_marker_step() needs: data_predict_all (at-risk-filtered), survival_variable, predict.time.infinity, S_T_all_infinity, has_cr, D_T_all_infinity (NULL if no competing risk), f_y_D_all_infinity, and the dispatched conditionalYTBio_fun/conditionalYDTBio_fun functions.