Computing in STK4080 autumn 2012

We will use the the programming language R for the practical computing in the lectures as well as the exercises in STK4080.

Below will be given:

  • information on some additional R packages that will be used in the course
  • information on some of the data sets that will be used for illustration in the lectures and the exercises
  • R code for the examples and illustrations

R packages

The package "mstate" may be used to estimate transition probabilites in competing risks and Markov chain models. A description of the package is given in a paper by de Wreede et al. in the Journal of Statistical Software .

The package "parfm" may be used to fit parametric frailty models. A description of the package is given in a paper by Munda et al. in the Journal of Statistical Software

Data sets

Causes of death and mortality in three Norwegian counties: Description Data

Bone marrow transplantation data: Description Data

IUD data: Description Data

Leukemia data: Description Data

Melanoma data: Description Data

R code used in the lectures:

Week 37: Commands for computing Nelson-Aalen estimates are given here .

Week 38: Commands for computing Kaplan-Meier estimates are given here .

Week 39: Commands for computing estimates for competing risks (and Markov chains) are given here .

Week 40: Commands for computing non-parametric tests are given here .

Week 41: Commands for estimating regression coefficients, cumulative hazards, and survival functions for Cox regression are given here .

Week 42: Commands for estimation in stratified Cox regresssion and commands for model check are given here .

Week 43: Commands for additive regression are given here .

Week 45: Commands for Poisson regression are given here .

Week 46: Commands for parametric frailty models are given here .

Week 47: Commands for computing empirical Bayes estimates of individual frailties are given here .

R code for trial project

R commands for the trial project are given here .

R code used in the exercises:

Exercise 3.1

Exercises 3.4 and 3.7

Exercise 3.9

Exercise 3.13

Practical exercise 1

Practical exercise 2

Practical exercise 3

Practical exercise 4

Practical exercise 5

Practical exercise 6

Practical exercise 7

Practical exercise 8

Practical exercise 9

Practical exercise 10

Practical exercise 11

Practical exercise 12

Published July 31, 2012 1:35 PM - Last modified Nov. 23, 2012 4:38 PM