Select_link_BivCop {BRBVS}R Documentation

Select Best Link Function for Bivariate Copula Survival Models

Description

Selects the best link function for bivariate copula survival models based on AIC or BIC measures. It evaluates different margins (link functions) for the survival models and selects the one with the lowest AIC or BIC.

Usage

Select_link_BivCop(
  data,
  cens1,
  cens2,
  lowerBt1 = "t11",
  lowerBt2 = "t21",
  upperBt1 = "t12",
  upperBt2 = "t22",
  measure = "AIC",
  eta1 = NULL,
  eta2 = NULL,
  input_equation = FALSE
)

Arguments

data

A data frame containing the dataset.

cens1

Censoring indicator for the first time to event.

cens2

Censoring indicator for the second time to event.

lowerBt1

Character. Name of the lower bound for the first time to event.

lowerBt2

Character. Name of the lower bound for the second time to event.

upperBt1

Character. Name of the upper bound for the first time to event.

upperBt2

Character. Name of the upper bound for the second time to event.

measure

Character. Measure to be minimized during the selection process. Either 'AIC' or 'BIC'. Default is 'AIC'.

eta1

Formula for the first survival model equation. Default is NULL.

eta2

Formula for the second survival model equation. Default is NULL.

input_equation

Logical. If TRUE, uses the provided eta1 and eta2 formulas. If FALSE, generates formulas using all predictors in data. Default is FALSE.

Value

A list containing:

Examples


###############################################
# Example based on AREDS dataset
# This analysis serves solely as a
# demonstration of the function's capabilities.
###############################################
data(AREDS)

results <- Select_link_BivCop(data = AREDS, cens1 = AREDS$cens1,
                              lowerBt1 = 't11', lowerBt2 = 't21',
                              upperBt1 = 't12', upperBt2 = 't22',
                              cens2 = AREDS$cens2, measure = 'AIC')
print(results)



[Package BRBVS version 0.2.1 Index]