Package org.biojava.nbio.survival.cox
Class SurvivalInfoHelper
- java.lang.Object
-
- org.biojava.nbio.survival.cox.SurvivalInfoHelper
-
public class SurvivalInfoHelper extends Object
Used to work with SurvivalInfo- Author:
- Scooter Willis
-
-
Constructor Summary
Constructors Constructor Description SurvivalInfoHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayList<String>addInteraction(String variable1, String variable2, ArrayList<SurvivalInfo> survivalInfoList)To test for interactions use two variables and create a third variable where the two are multiplied together.static voidcategorizeData(ArrayList<SurvivalInfo> DataT)Take a collection of categorical data and convert it to numeric to be used in cox calculationsstatic voiddump(ArrayList<SurvivalInfo> DataT, PrintStream ps, String delimiter)For each analysis this allows outputing of the data used in the calculations to a printstream/file.static ArrayList<String>getGroupCategories(String groupName, ArrayList<SurvivalInfo> survivalInfoList)static voidgroupByRange(double[] range, String variable, String groupName, ArrayList<SurvivalInfo> survivalInfoList)Need to allow a range of values similar to cut in R and a continuous c
-
-
-
Constructor Detail
-
SurvivalInfoHelper
public SurvivalInfoHelper()
-
-
Method Detail
-
dump
public static void dump(ArrayList<SurvivalInfo> DataT, PrintStream ps, 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(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 ArrayList<String> addInteraction(String variable1, String variable2, 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, String variable, String groupName, ArrayList<SurvivalInfo> survivalInfoList) throws Exception
Need to allow a range of values similar to cut in R and a continuous c- Parameters:
range-variable-groupName-survivalInfoList-- Throws:
Exception
-
getGroupCategories
public static ArrayList<String> getGroupCategories(String groupName, ArrayList<SurvivalInfo> survivalInfoList)
- Parameters:
groupName-survivalInfoList-- Returns:
-
-