Sample Regression Analysis With a User Supplied Data File
This example is an analysis of trends in colorectal cancer incidence rates by race and sex from 2000-2021 in the SEER cancer registries.
Using Joinpoint
There are four basic steps involved in generating any Joinpoint trend analysis. Review the description of the process:
- Creating an Input Data File for Joinpoint (or for this exercise you can use the files below created for this exercise)
- Setting Parameters in the Joinpoint Program
- Executing the Joinpoint Regression Program
- Viewing the Joinpoint Results
Creating an Input Data File for Joinpoint
The Joinpoint input file must be an ASCII text file. Refer to the Joinpoint help system for details concerning the format of this file. You may use SAS, SPSS, Excel, Word, or any software package to create this text file. This example uses a .txt file with the following variable columns:
- Sex
- This is a by-variable
- Race
- This is a by-variable
- Year
- This is the independent variable
- Rate
- This is the dependent variable
- Standard Error
- This is the standard error of the rate
Data files must be sorted first by the by-variables and then the independent variable:
Race | Sex | Year of diagnosis | Age-Adjusted Rate | Standard Error |
---|---|---|---|---|
Black | Female | 2000 | 53.73249 | 0.899721 |
Black | Female | 2001 | 55.36324 | 0.903159 |
... | ||||
Black | Female | 2020 | 31.14983 | 0.530203 |
Black | Female | 2021 | 36.16399 | 0.568716 |
Black | Male | 2000 | 73.37844 | 1.359179 |
Black | Male | 2001 | 71.75143 | 1.318091 |
... | ||||
Black | Male | 2020 | 42.90949 | 0.737329 |
Black | Male | 2021 | 46.69265 | 0.759171 |
White | Female | 2000 | 47.48748 | 0.2794 |
White | Female | 2001 | 46.36287 | 0.275121 |
... | ||||
White | Female | 2020 | 29.38692 | 0.204186 |
White | Female | 2021 | 31.799 | 0.212428 |
White | Male | 2000 | 66.54095 | 0.388031 |
White | Male | 2001 | 65.58043 | 0.382442 |
... | ||||
White | Male | 2020 | 37.69669 | 0.243435 |
White | Male | 2021 | 40.9378 | 0.252906 |
Sample.From.Text.File.txt is the data file you will use this file as the Input Data File for this exercise.
Setting Parameters in the Joinpoint Program
The Joinpoint Regression Program requires that you specify parameters that are organized on three tabs: the Input File tab, the Method and Parameters tab, and the Advanced Analysis Tools tab.
Input File Tab
The Input File tab specifies the file format of the input data file and some additional settings for the model. For this exercise we will set the Independent Variable, Dependent Variable, Standard Error, and two By-Variables. We will leave the other settings on this tab set to their default values.
Method and Parameters Tab
The Method and Parameters tab specifies the modeling method, constraints on the location(s) of the joinpoints, number of joinpoints, model selection method, AAPC segment ranges, and APC/AAPC/Tau confidence intervals. For this exercise, the default settings on the Method and Parameters tab tab were used.
Advanced Analysis Tools Tab
The Advanced Analysis Tools tab can be used to set up a parallel or coincident pairwise comparison or a Jump Model/Comparability Ratio Model analysis. The pairwise comparison is only relevant if you have one or more By Variables defined on the Input File tab. There will also be enhancements to this tab in the future that include multi-group clustering.
Executing the Joinpoint Regression Program
Once an input data file has been created and loaded into the session, and parameters have been selected, the program can be executed by clicking the green execute button on the Joinpoint toolbar. A progress meter will be shown on the screen while the Joinpoint calculation engine processes the data and generates the output. Note, it can take a few minutes to execute, depending on the size of the input data file and the options selected. After execution has completed, Joinpoint opens an output window to display the results.
Viewing the Joinpoint Results
For standard Joinpoint analyses, the output window displays the results on five tabs: Graph, Data, Model Estimates, Trends, and Model Selection. When using the Pairwise Comparison or Jump Model options, an additional tab labeled with the appropriate option will be shown. There is a cohort tree located to the left of the tabs to traverse the cohorts and various joinpoints in your analysis.
The results of your session are not automatically saved. If you close the output window without saving your results, you will need to re-run the analysis. The results can be saved to a Joinpoint output file (i.e. sample.from.text.file.output.jpo) by selecting Save or Save As from the File menu, or by clicking on the Save button on the toolbar. The results can be sent to a printer, PDF, Word, or Excel by clicking the Print button from the Joinpoint toolbar, and there are options to customize which elements of the output to include. The results can also be exported as text files and image files (for the graphs) by clicking the Export button on the toolbar making your selections.
Running a Joinpoint Analysis With a User Supplied Data File
- Download the following file to use in this exercise by right clicking on the link and using Save Link As... to save the file on your computer:
- Sample.From.Text.File.txt is the data file you will use this file as the Input Data File for this exercise.
The input data file for this example contains age-adjusted incidence rates and standard errors by year of diagnosis, race, and sex. We used the SEER*Stat software to generate these rates for colorectal cancer in the 22 SEER registries, 2000-2021.
- Sample.From.Text.File.txt is the data file you will use this file as the Input Data File for this exercise.
- Open Joinpoint and click the New button from the toolbar. The Open file dialog will open.
- Browse to the folder where you saved the files for the exercise and open the Sample.From.Text.File.txt file.
- The Joinpoint session will open to the Input File tab. Below is a picture of the window you should see:
- Set the Independent Variable, Age-Adjusted Rate and Standard Error by clicking on each drop-down box and choosing the appropriate column from the data file.
- Click the "Add" button in the By Variables section, select "Race" from the list of available variables (by clicking it) and then click "Ok"
- Repeat this step for "Sex"
- Your Input File Tab should now look like this:
- Click on the Execute button on the toolbar to execute the session. The progress dialog opens showing the progress of the Joinpoint software. When it is complete, the Output Results opens with the Graph tab displayed.
- To save the results so that they can be opened up later in Joinpoint without re-running the analysis, click the Save button and choose an appropriate file name and location. Please note that when you save the results, you also save the session parameters with it. Once a results file is open, you can retrieve the session that was used to produce it by using the Retrieve Session button on the Joinpoint toolbar. There is no need to save BOTH the session and output results to file.
- To export the results as text files, click the Export button on the Joinpoint toolbar. The Export dialog will open.
The following graph is the result of the session in the example for a maximum of 4 joinpoints. It is a scatter plot of the age-adjusted colorectal cancer incidence from SEER, for black females from 2000 to 2021. A Joinpoint Model is also drawn on this graph. In this case, the model is two line segments joined at the joinpoint of 2003. The APCs (Annual Percent Change) indicate the magnitude of the trend for each segment or time period.
This example is an analysis of trends in colorectal cancer incidence rates from 2000-2021 in the SEER cancer registries. The input data file used contains age-adjusted incidence rates and standard errors by year of diagnosis, race, and sex. We used the SEER*Stat software to generate these rates for colorectal cancer in the 22 SEER registries, 2000-2021.
