`vignettes/survivalAnalysis.Rmd`

`survivalAnalysis.Rmd`

Survival analysis is the analysis of data involving times to some event of interest. However, the event may not be observed for some individuals within the study time period, producing the so-called censored observations.

The next Cornerstone dataset shows the data structure proposed for survival analysis:

Censoring data are described by 3 columns:

- Left Censoring time (
**lct**) : Point of time the unit has already failed - Right Censoring time (
**rct**) : Point of time the unit has not yet failed - Counts (
**n**) : number of cases having the same data

There are 4 possible situations:

- Exact failure times lct and rct and equal
- Right censored data lct is known, rct is unknown and left empty (“suspended cases”)
- Interval censored data lct and rct and known but not equal (lct < rct)
- Left censored data lct is left empty, rct is known

All of the 4 cases may occur with the same data for more than one unit. Therefore it is convenient to have a third column (“count”) where this number can be specified. Typically this will occur for suspended cases but is also allowed for the three other situations.

With the method ‘survivalAnalysis’ in ‘Cornerstone’ from ‘CornerstoneR’, we can fit reliability data with survival times as responses and number of cases having the same data as predictor.

How do we use the method ‘survivalAnalysis’ in ‘Cornerstone’ from ‘CornerstoneR’?

To use a survival analysis model in ‘Cornerstone’ open a dataset, e.g. ‘weibull_lognormal_data’ and choose menu ‘Analysis’ \(\rightarrow\) ‘CornerstoneR’ \(\rightarrow\) ‘Survival Analysis’ as shown in the following screenshot.

In the appearing dialog select ‘Count’ variable to predictor. ‘Lognormal left censoring time’ and ‘Lognormal right censoring time’ are the responses variables. It is only possible to select two responses variable and one predictor variable.

‘OK’ confirms your selection and the following window appears.

Before we start the script, it is necessary to set the following options:

- the confidence level
- the type of distributions: ‘Weibull’ or ‘Lognormal’

To do this, we open the menu ‘R Script’ \(\rightarrow\) ‘Script Variables’. The screenshot shows the default options.

In the appearing dialog, we select

- “0.95” as confidence level
- “Lognormal” for the lognormal distribution

Now, close this dialog via ‘OK’ and click the execute button (green arrow) or choose the menu ‘R Script’ \(\rightarrow\) ‘Execute’ and all calculations are done via ‘R’. Calculations are done if the text at the lower left status bar contains ‘Last execute error state: OK’. Our result is available via the menu ‘Summaries’ as shown in the following screenshot.

The menu ‘Estimation Parameters’ displays the estimation of distribution parameters, the log likelihood and the confidence intervals of distribution parameters.

Via ‘Summaries’ \(\rightarrow\) ‘Estimation Parameters’ the following dataset is shown.

The menu ‘Confidence Contours’ is used to create a contour plot for parameter of confidence intervals

Via ‘Summaries’ \(\rightarrow\) ‘Confidence Contours’ the following dataset is shown.

To have a better overview of the estimation of distribution parameters, we can have a look at the contour plot for parameter of confidence intervals, by selecting ‘Graphs’ \(\rightarrow\) ‘Contour Plot for parameter CIs’ in the R Script menu. The following window with the requested graph appears.

The menu ‘Reliability Prediction’ displays the estimation of the cumulative distribution function (CDF) and the confidence intervals of the cumulative distribution function (CDF). This will be used to predict the failure rate.

Via ‘Summaries’ \(\rightarrow\) ‘Reliability Prediction’ the following dataset is shown.

To have a better overview of the failure rate predictions with confidence intervals, we can have a look at the line graph, by selecting ‘Graphs’ \(\rightarrow\) ‘Failure Rate Predictions with CI’ in the R Script menu. The following window with the requested graph appears.

To get a better view of the graph, we need to scale the X-axis by log 10. To do this please select the X-axis, then choose menu ‘Axes’ \(\rightarrow\) ‘Axis Range…’ as shown in the following screenshot.

In the appearing dialog, we select

- “User-Defined Value” in the ‘Minimum’ box, then enter a minimum value greater than 0.
- “Log 10” in the ‘Scale’ box.

‘OK’ confirms your selection and the following graph appears.