Class SurvivalInfoHelper


  • public class SurvivalInfoHelper
    extends java.lang.Object
    Used to work with SurvivalInfo
    Author:
    Scooter Willis
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.ArrayList<java.lang.String> addInteraction​(java.lang.String variable1, java.lang.String variable2, java.util.ArrayList<SurvivalInfo> survivalInfoList)
      To test for interactions use two variables and create a third variable where the two are multiplied together.
      static void categorizeData​(java.util.ArrayList<SurvivalInfo> DataT)
      Take a collection of categorical data and convert it to numeric to be used in cox calculations
      static void dump​(java.util.ArrayList<SurvivalInfo> DataT, java.io.PrintStream ps, java.lang.String delimiter)
      For each analysis this allows outputing of the data used in the calculations to a printstream/file.
      static java.util.ArrayList<java.lang.String> getGroupCategories​(java.lang.String groupName, java.util.ArrayList<SurvivalInfo> survivalInfoList)  
      static void groupByRange​(double[] range, java.lang.String variable, java.lang.String groupName, java.util.ArrayList<SurvivalInfo> survivalInfoList)
      Need to allow a range of values similar to cut in R and a continuous c
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SurvivalInfoHelper

        public SurvivalInfoHelper()
    • Method Detail

      • dump

        public static void dump​(java.util.ArrayList<SurvivalInfo> DataT,
                                java.io.PrintStream ps,
                                java.lang.String delimiter)
        For each analysis this allows outputing of the data used in the calculations to a printstream/file. This then allows the file to be loaded into R and calculations can be verified.
        Parameters:
        DataT -
        ps -
        delimiter -
      • categorizeData

        public static void categorizeData​(java.util.ArrayList<SurvivalInfo> DataT)
        Take a collection of categorical data and convert it to numeric to be used in cox calculations
        Parameters:
        DataT -
      • addInteraction

        public static java.util.ArrayList<java.lang.String> addInteraction​(java.lang.String variable1,
                                                                           java.lang.String variable2,
                                                                           java.util.ArrayList<SurvivalInfo> survivalInfoList)
        To test for interactions use two variables and create a third variable where the two are multiplied together.
        Parameters:
        variable1 -
        variable2 -
        survivalInfoList -
        Returns:
      • groupByRange

        public static void groupByRange​(double[] range,
                                        java.lang.String variable,
                                        java.lang.String groupName,
                                        java.util.ArrayList<SurvivalInfo> survivalInfoList)
                                 throws java.lang.Exception
        Need to allow a range of values similar to cut in R and a continuous c
        Parameters:
        range -
        variable -
        groupName -
        survivalInfoList -
        Throws:
        java.lang.Exception
      • getGroupCategories

        public static java.util.ArrayList<java.lang.String> getGroupCategories​(java.lang.String groupName,
                                                                               java.util.ArrayList<SurvivalInfo> survivalInfoList)
        Parameters:
        groupName -
        survivalInfoList -
        Returns: