Class KaplanMeierFigure

    • Constructor Detail

      • KaplanMeierFigure

        public KaplanMeierFigure()
    • Method Detail

      • getGroups

        public ArrayList<String> getGroups()
        Get the name of the groups that are being plotted in the figure
        Returns:
      • getSurvivalTimePercentile

        public Double getSurvivalTimePercentile​(String group,
                                                double percentile)
        To get the median percentile for a particular group pass the value of .50.
        Parameters:
        group -
        percentile -
        Returns:
      • setKMFigureInfo

        public void setKMFigureInfo​(KMFigureInfo kmfi)
        Parameters:
        kmfi -
      • setFigureLineInfo

        public void setFigureLineInfo​(ArrayList<String> lineInfoList)
        Parameters:
        lineInfoList -
      • setCoxInfo

        public void setCoxInfo​(ArrayList<String> title,
                               CoxInfo ci,
                               String strataVariable,
                               LinkedHashMap<String,​String> legendMap,
                               Boolean useWeighted)
                        throws Exception
        Parameters:
        title - Title of figures
        ci -
        strataVariable - The column that based on value will do a figure line
        legendMap - Map the value in the column to something readable
        useWeighted -
        Throws:
        Exception
      • fmt

        public static String fmt​(Double d,
                                 int precision,
                                 int pad)
        Parameters:
        d -
        precision -
        pad -
        Returns:
      • getSurvivalFitInfo

        public SurvFitInfo getSurvivalFitInfo()
        Returns:
      • setSurvivalData

        public void setSurvivalData​(ArrayList<String> title,
                                    SurvFitInfo sfi,
                                    Double userSetMaxTime)
        Allow setting of points in the figure where weighted correction has been done and percentage has already been calculated.
        Parameters:
        title -
        sfi -
        userSetMaxTime -
      • saveSurvivalData

        public void saveSurvivalData​(String fileName)
                              throws Exception
        Save data from survival curve to text file
        Parameters:
        fileName -
        Throws:
        Exception
      • getFileName

        public String getFileName()
        Returns:
        the fileName
      • getTop

        public int getTop()
        Returns:
        the top
      • getBottom

        public int getBottom()
        Returns:
        the bottom
      • getLeft

        public int getLeft()
        Returns:
        the left
      • getRight

        public int getRight()
        Returns:
        the right
      • getxAxisTimeValues

        public ArrayList<Double> getxAxisTimeValues()
        Returns:
        the xAxisTimeValues
      • getxAxisTimeCoordinates

        public ArrayList<Integer> getxAxisTimeCoordinates()
        Returns:
        the xAxisTimeValues
      • getTimeAxisIncrementPercentage

        public Double getTimeAxisIncrementPercentage()
        Get the percentage increment for the time axis
        Returns:
      • savePNGKMNumRisk

        public void savePNGKMNumRisk​(String fileName)
        Combine the KM and Num risk into one image
        Parameters:
        fileName -
      • savePNG

        public void savePNG​(String fileName)
        Parameters:
        fileName -
      • main

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