Class CoxHelper


  • public class CoxHelper
    extends Object
    The CoxHelper class is provided to start with a tab delimited file in a similar process in R and return the results as a CoxInfo class. Given the number of options for adjusting the calculations using weighting, strata, clustering etc the helper class can be used to hide the complexity for typical use case.
    Author:
    Scooter Willis
    • Method Detail

      • process

        public static CoxInfo process​(String datafile,
                                      String timeColumn,
                                      String statusColumn,
                                      String weightColumn,
                                      String strataColumn,
                                      String clusterColumn,
                                      ArrayList<String> variables,
                                      boolean useStrata,
                                      boolean useWeights)
                               throws Exception
        Parameters:
        datafile - The tab delimited file containing survival data and variables. The first column needs to be unique index
        timeColumn - The column representing the event/censor time
        statusColumn - The column representing an event=1 and censor=0
        weightColumn - For case-cohort data sets may require weighting to reflect the entire cohort
        strataColumn - A column representing strata data
        clusterColumn - If robost variation calculation is required the cluster column will group samples by the value in this column
        variables - The variables to be used in the cox regression analysis. For Interactions using variable1:variable2
        useStrata - Boolean to indicate if strata column should be used
        useWeights - Boolean to indicate if weight column should be used
        Returns:
        Throws:
        Exception
      • process

        public static CoxInfo process​(WorkSheet worksheet,
                                      String timeColumn,
                                      String statusColumn,
                                      String weightColumn,
                                      String strataColumn,
                                      String clusterColumn,
                                      ArrayList<String> variables,
                                      boolean useStrata,
                                      boolean useWeights)
        Parameters:
        worksheet -
        timeColumn - The column representing the event/censor time
        statusColumn - The column representing an event=1 and censor=0
        weightColumn - For case-cohort data sets may require weighting to reflect the entire cohort
        strataColumn - A column representing strata data
        clusterColumn - If robost variation calculation is required the cluster column will group samples by the value in this column
        variables - The variables to be used in the cox regression analysis. For Interactions using variable1:variable2
        useStrata - Boolean to indicate if strata column should be used
        useWeights - Boolean to indicate if weight column should be used
        Returns:
      • main

        public static void main​(String[] args)
        Parameters:
        args - the command line arguments