Computing in STK4080 autumn 2014

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

  • information on some 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 lectures and exercises

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

Leukemia data: Description Data

Melanoma data: Description Data

R code used in the lectures

Week 37: Commands for computing Nelson-Aalen and Kaplan-Meier estimates for the leukemia data are given here .

Week 38: Commands for computing retricted means and quartiles for the leukemia data are given here .

Week 39: Commands for competing causes of death for Norwegian males are given here .

Week 39: Commands for non-parametric tests for the melanoma data are given here .

Week 40: Commands for Cox regression for the melanoma data are given here .

Week 41: Commands for model check for Cox regression for the melanoma data are given here .

Week 42: Commands for additive regression for the melanoma data are given here .

Week 43: Commands for parametric models are given here .

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

R code used in the exercises

Exercise 3.9

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

 

R code used in the trial project

Overview of R commands

Detailed R commands

Published July 28, 2014 12:33 PM - Last modified Nov. 13, 2014 4:47 PM