Survival Kit

Z MetaCentrum
Přejít na: navigace, hledání


Description

Survival Kit is primarily intended to fill a gap in the software available to animal breeders who generally tend to use extremely large data sets and want to estimate random effects. Methods of survival analysis have primarily been developed in the area of clinical biometrics where data sets and number of levels of effects are usually smaller.

Although developed by animal breeders for animal breeders, the programs of the Survival Kit could be interesting for people from other areas encountering similar problems of large models and random effects. To make the Survival Kit user-friendly, commands used in the parameter files mimic the SAS command language.

The models supported by the Survival Kit belong to the group of univariate proportional hazards models with a single response time. Fixed and random covariates (discrete and continuous) as well as strata may be included in the analysis. Both types of covariates may be time-dependent. Features include likelihood ratio tests for the full model and any submodel, prediction of (e.g.) median survival times for any given combination of covariates and various bells and whistles for complex models and large data sets. With version 6 it is possible to estimate variances of two random effects at the same time using a derivative free algorithm.

The Survival Kit consists of three main tools and a set of support programs:

Main tools:

  • prepare.exe -- for data preparation
  • cox.exe -- for analysis under the Cox model
  • weibull.exe -- for analysis under a model with Weibull baseline hazard function

Support programs:

  • digamma.exe -- program to transform the value of gamma into trigamma
  • simul.exe -- database simulation for the Survival Kit
  • SKonstructor.exe -- Java application for parameter file creation
  • sortSKit -- R function for sorting of the recoded data file

Availability

Survival Kit is available in the version 6.06.

Use

  • load the module into the environment
$ module add survivalkit-6.06
  • further, proceed based on the program you intend to use:

1. Main tools

prepare.exe tool:

  • prepare the program input file (named prepare.txt) into the working directory
  • run the program prepare.exe in the working directory (the input file will be loaded automatically)
$ cd $WORKING_DIRECTORY
$ prepare.exe

cox.exe tool:

  • in the working directory, prepare the output file of the prepare.exe tool (named varlist.txt) and the COX program input file (the description of the statistical model used -- named cox.txt)
  • run the cox.exe in the working directory
    • if the files are named differently, pass their names as the input parameters to COX tool
$ cd $WORKING_DIRECTORY
$ cox.exe     # alternatively: $ cox.exe varlist.txt cox.txt

weibull.exe tool:

  • in the working directory, prepare the output file of the prepare.exe tool (named varlist.txt) and the WEIBULL program input file (the description of the statistical model used -- named weibull.txt)
  • run the weibull.exe in the working directory
    • if the files are named differently, pass their names as the input parameters to WEIBULL tool
$ cd $WORKING_DIRECTORY
$ weibull.exe      # alternatively: $ weibull.exe varlist.txt weibull.txt

2. Support programs

digamma.exe program:

  • method 1) once the program starts, write the value intended to convert into the terminal:
$ digamma.exe
  GAMMA ? 
25.1
 Digamma(gamma)=   3.2028152753594581     
 E(loggamma variable)= -2.00525707782803764E-002
 Trigamma(gamma)=  4.06448119882078934E-002
  • method 2) pass the value intended to convert to the program input:
$ echo 25.1 | digamma.exe 
  GAMMA ? 
 Digamma(gamma)=   3.2028152753594581     
 E(loggamma variable)= -2.00525707782803764E-002
 Trigamma(gamma)=  4.06448119882078934E-002

simul.exe program:

  • write the input data into the terminal, answering the program questions:
$ simul.exe
...

simul program for R tool:

  • if you want to generate the simulation database within the R program, run the R, load the library provided by Survival Kit, and generate the database as intended (passing the proper input parameters):
$ module add R             # load the R application module
$ R                        # run the R program (the other commands are passed into the R environment)
... (intro text) ...
> source("/software/survivalkit-6.06/Survival_Kit_support_programs/R_extensions/simul_for_R/simul.r")
> simul(seed=..., n=..., rho=..., tmed=..., tcens=..., nfix=..., nlevfix=c(...,...,...),
    fixmin=c(...,...,...), fixmax=c(...,...,...), nsire=..., variance=..., nss=..., wdNew="...", wdSetBack=...)
> q()
Save workspace image? [y/n/c]: n

SKonstructor.exe program:

  • since the SKonstructor.exe is a Java-based application, log into a frontend having an X display tunnelled (e.g., ssh -X <frontend> from a Linux box)
    • since SKonstructor.exe is a low-demanding application, you can run it directly from a frontend
  • run the tool
$ SKonstructor.exe

sortSKit program for R:

  • if you want to sort a data file (e.g., for its further use by COX program), run the R program, load the library provided by Survival Kit, and sort the file as intended (passing the proper input parameters):
$ module add R             # load the R application module
$ R                        # run the R program (the other commands are passed into the R environment)
... (intro text) ...
> source("/software/survivalkit-6.06/Survival_Kit_support_programs/R_extensions/sortSKit/sortSKit.r")
> sortSKit("input_file.dat", "output_file.dat", mode="cox")  # or another parameters -- see documentation
> q()
Save workspace image? [y/n/c]: n

Documentation

Survival Kit documentation

is available

  • locally in the /software/survivalkit-6.06/Survival_Kit_v6_manual.pdf file
  • use case examples are available:
    • locally in the /software/survivalkit-6.06/Survival_Kit_v6_examples.pdf
      • source files for examples are available in the /software/survivalkit-6.06/Survival_Kit_examples directory
    • remotely on http://en.wikiversity.org/wiki/Survival_Kit

simul for R documentation

is available

  • locally in the /software/survivalkit-6.06/Survival_Kit_support_programs/R_extensions/simul_for_R/simul_for_R_manual.pdf file

sortSKit for R documentation

is available

License

The program is free of charge for research purposes, but the use should be acknowledged in publications "(Ducrocq et al., 2010)".

Supported platforms

Linux

Program administrator

Ludmila Zavadilová, Tomáš Rebok meta@cesnet.cz

Homepage