R code for chapter 9
Quicklinks for Chapter 9
Section 9.2
Section 9.2.1
Subsection: Combined endpoint analysis
For the next analysis, we have to transform the icu.pneu data included in the kmi package into a format which allows us to use the mvna and etm package, as the data set is primarily tailored for a cox analysis with a time-dependent covariate.
| Load the data. | 
  |  		
| Then, we perfom the transformation. | 
  |  		
| Event indicator variable to for a first event analysis: | 
  |  		
| Keep the variables of interest | 
  |  		
| Creation of a matrix with logical entries defining the possible transitions: | 
  |  		
| Computation of the cumulative transition hazards using mvna: | 
  |  		
| Figure 9.2 | 
  |  		
| Estimation of the transition probabilities using the etm package: | 
  |  		
| Figure 9.3 | 
  |  		
| Landmark analysis Creation of the landmark time points:  |  		
  |  		
| Computation of transition probabilities with s = time.points | 
  |  		
| Figure 9.4 | 
  |  		
Subsection: Analysis of competing endpoints in a progressive model.
| For the analysis of the progressive model, we have to transform the data again into a progressive model. | 
  |  		
| Then, we can create the matrix of logical values defining the possible transitions. | 
  |  		
| Cumulative transitions hazards: | 
  |  		
| Figure 9.6 | 
  |  		
| Computation of matrix of transition probabilities: | 
  |  		
| Figure 9.7 | 
  |  		
Section 9.2.2
| A little modification of the data to avoid entry times equal to exit times, which throws an error | 
  |  		
| Definition of matrix of logical values specifying possible transitions: | 
  |  		
| Estimation of cumulative transition hazards: | 
  |  		
| Figure 9.8 | 
  |  		
Kontakt
Klicken Sie hier um zu unserer Kontaktseite zu gelangen.

