forward_selection_BivCop {BRBVS}R Documentation

Forward Selection for Bivariate Copula Survival Models

Description

This function performs forward selection based on AIC or BIC measures for bivariate copula survival models. It iteratively adds variables to the model to minimize the specified measure, either AIC or BIC.

Usage

forward_selection_BivCop(
  data,
  lowerBt1 = "t11",
  lowerBt2 = "t21",
  upperBt1 = "t12",
  upperBt2 = "t22",
  copula = "N",
  margins = c("PH", "PH"),
  measure = "AIC",
  cens1,
  cens2
)

Arguments

data

A data frame containing the dataset.

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.

copula

Character. Type of copula to be used in the model. Default is 'N' (Normal copula).

margins

Character vector. Margins to be used in the copula model. Default is c('PH', 'PH').

measure

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

cens1

Censoring indicator for the first time to event.

cens2

Censoring indicator for the second time to event.

Value

A list containing:

Examples


###############################################
# Example based on AREDS dataset
# This analysis serves solely as a
# demonstration of the function's capabilities.
###############################################
data(AREDS)
subsetAREDS <- AREDS[, c('t11', 't12', 't21', 't22', 'SevScale1E',
                         'SevScale2E', 'cens1', 'cens2', 'cens')]
results <- forward_selection_BivCop(data = subsetAREDS, lowerBt1 = 't11', lowerBt2 = 't21',
                                    upperBt1 = 't12', upperBt2 = 't22',
                                    copula = 'N', margins = c('PH', 'PH'),
                                    measure = 'AIC', cens1 = AREDS$cens1,
                                    cens2 = AREDS$cens2)
print(results)



[Package BRBVS version 0.2.1 Index]