# Survival Kit, software/Small example

The usage of the program will be demonstrated on the "Small example" file. The detailed description of this example is already included in the manual, so only some generally important points will be raised here. Although only this example is mentioned here, the procedure is very similar in all cases.

## Directory

First thing you need to do is to copy small.dat, prepare.txt, cox.txt and weibull.txt along with the compiled executable files prepare.exe, weibull.exe and cox.exe. Note: One of the common mistakes which novice users make is to keep multiple evaluations in one directory. After several runs the directory is filled with the results and additional files created by the Survival Kit which may lead to confusions and a big mess. Keep separate databases in separate directories. This is a practical experience...

## Run Prepare

To do this you should start the program in the command prompt. Click Start then Run.. and write "cmd" and hit Enter. In the command prompt navigate to the directory with the prepare.exe file and run it. The program will automatically search for the name of the parameter file prepare.txt.
If you get an error message saying something like "The value of the STATUS specifier in an OPEN statement..." one of these problems occurred:
* you don't have the file prepare.txt in the same directory as the executable file you are running
* your data file is either missing or has some other name as stated in prepare.txt
* optional: your pedigree (or other) file name is either missing or has some other name as stated in prepare.txt
If you run everything correctly, you will see the numbers of classes for each CLASS effect and a reminder about sorting if you use the COX program.

## Run Weibull

You can run the WEIBULL program just after running the prepare.exe at least once, since it needs some files that are created by the PREPARE program. These additional files contain the recoded values for your variables. You can find out more information about them in the manual. Note: You don't have to modify these at all.
You should run the PREPARE program before running WEIBULLl.It doesn't mean however that you have to run PREPARE every time. If you change the MODEL or adjust different settings you do not need to rerun PREPARE again if every variable needed in the WEIBULL program is included in PREPARE's OUTPUT statement. Please note that not every variable from this OUTPUT statement should be used in the MODEL (i.e. you can include all effects to the OUTPUT in PREPARE and use just a few in WEIBULL's MODEL).
If you run stratified analysis in WEIBULL the output data file from prepare (small2.dat in this example) should be sorted ascending by the STRATA variable.
When running the WEIBULL, the program will use the parameter file names varlist.txt and weibull.txt automatically. Again "The value of the STATUS specifier in an OPEN statement..." error message may pop up here from similar reasons as for PREPARE (i.e. you are missing these files from your directory, or they have other names).
Unless you use the LOGFILE statement, you will be prompted to enter the name for the "detailed output file". You can enter any name, where detailed computations will be stored. If you hit "Enter" here, the computations will be printed to the screen.

## Run Cox

Running the COX program is very similar to WEIBULL. The major difference is that you have to sort the recoded data file (small2.dat in this example) ascending by time variable (1st column) and descending by censoring variable (2nd column). If you run a stratified analysis the sorting order modifies to: ascending by strata variable (the column number of the strata), ascending by time variable (1st column) and descending by censoring variable (2nd column).
The default file names used for COX are varlist.txt for variable list and cox.txt for the model description. Similarly to WEIBULL you will be asked to enter the file name for the "detailed output file", unless you use the LOGFILE keyword in cox.txt.
Survival Kit: Before you begin - Small example - Sorting - Tips and Tricks - FAQ - Older versions - Other possibilities