Once you have identified which variables you would like to examine in SDA, you may run a frequency or cross-tabulation analysis.
View the Program Selection Screen
Important Note. This tutorial explains procedures based on the "classic SDA interface". For consistency, the classic interface will continue to be displayed in the frame to the right. The SDA system was recently upgraded and now uses an enhanced interface for all SAMHDA studies by default. Further information about this enhanced interface
Login. If you have not already logged in, selecting the above link will first take you to a MyData login screen. You can log in as a Guest/Anonymously or as a Returning User.
Terms of Use. Use of many SDA features will require you to read and agree to a Terms of Use statement once per login. Once you select the I Agree button, you will be directed to the selected feature.
To view the codebook in a separate browser window, click the Open Extra Codebook Window button in the program selection window. This allows you to browse the codebook and run an analysis at the same time. This also enables you to copy and paste the names of variables that you wish to analyze from the codebook window to the analysis window.
Select the button next to Run Frequency or Crosstabulation, and then click the Start button. The SDA Frequencies / Crosstabulation Program screen will appear.
Explanations for each option are available by clicking on the option name. For example, click on the word Row for an explanation of what a row variable is.
We will start with a univariate (one variable) tabulation of the variable COKEFLG. To do this, we will specify COKEFLG as the Row variable. (The Row variable categories will be displayed on the left side of the table.)
Enter the name of the variable COKEFLG into the Row box (or you can copy and paste from this tutorial or the codebook). You can enter the name either in upper case (COKEFLG) or in lower case (cokeflg).
Now select Run the Table near the bottom of the SDA Frequencies / Crosstabulation Program window. The requested table should appear in a new browser window within a few seconds. (Remember that the program must process nearly 1.9 million cases.)
The standard display of results for a univariate tabulation includes the following items:
Description of the variable. The Row variable was 'COKEFLG' -- COCAINE/CRACK REPORTED AT ADM.
Variable frequency distribution with percentages. Cocaine or crack was reported as a substance of abuse at admission 31.4% of the time.
Stacked bar chart. The chart displays the frequency distribution graphically. Other types of charts can also be requested.
Allocation of cases. Shows how many cases were used for the analysis. We see that the frequency distribution of COKEFLG was based on 1,861,209 cases. For this analysis, all of the cases were used.
Please return to the browser window displaying the SDA Frequencies/Crosstabulation Program.
Next we will run a crosstabulation of the variable COKEFLG by the variable GENDER.
Within the SDA Frequencies / Crosstabulation Program window, leave COKEFLG as the row variable. In the box next to Column enter the variable name GENDER.
Now select Run the Table near the bottom of the SDA Frequencies / Crosstabulation Program window. The requested crosstabulation of COKEFLG by GENDER should appear within a few seconds.
The standard display of results for a crosstabulation includes the following items:
Description of the variables. The Row variable was COKEFLG and the Column variable was GENDER.
Variable frequency distribution with percentages. Among males, cocaine or crack was reported as a substance of abuse at admission 29.8% of the time. Among females, the corresponding percentage was 34.9%. Combining males and females, in the column labeled Row Total, the overall percentage was 31.4%.
Notice that the color coding option in the table can help you identify the strength of the relationship between the two variables. A cell colored red has more cases than would be expected if no relationship existed between the two variables. A cell colored blue has fewer cases than would be expected.
Stacked bar chart. The chart displays the frequency distribution graphically. There are separate bars for males and for females.
Allocation of cases. Shows how many cases were used for the analysis. We see that this result was based on 1,860,595 cases. There were also 614 cases with invalid codes, so those cases were excluded from the analysis.
Please return to the browser window displaying the SDA Frequencies / Crosstabulation Program.
A selection filter limits the analysis to a subset of the cases in the data file. One possible use of a selection filter would be to limit the table to veterans. The variable for veteran status is VET in this data file, and we know from the codebook that a code of 1 means that the person was a veteran.
To limit the crosstabulation of COKEFLG by GENDER to veterans, enter VET(1) into the box next to Selection Filter(s).
Then select Run the Table and wait for the results to appear.
In the frequency distribution results we see that cocaine or crack was reported as a substance of abuse at admission in 30.6% of male veterans. The corresponding percentage for female veterans was 39.0%. The bar chart under the table shows the same result graphically.
In the Allocation of cases section, we see that this result was based on 59,780 cases. There were 1,801,401 cases that were excluded by the filter because they were not veterans. There were another 28 cases with invalid codes on the GENDER or COKEFLG variable, so those cases were excluded from the analysis.
Please return to the browser window displaying the SDA Frequencies / Crosstabulation Program.
A control variable is used to generate a separate crosstabulation for each category of the control variable. For example, instead of limiting the table just to veterans (by using a Selection Filter), we can run a separate table for veterans and another table for nonveterans by using VET as a control variable.
Within the SDA Frequencies / Crosstabulation Program screen, delete VET(1) from the box next to Selection Filter(s) and enter VET into the box next to Control.
Then select Run the Table and wait for the results to appear.
The results show one table and chart for veterans, one table and chart for nonveterans, also a combined table and chart for veterans and nonveterans.
Please return to the browser window displaying the SDA Frequencies / Crosstabulation Program.
One or more weight variables may be available for use in the analysis for some data sets. However, this is not applicable to the 2005 TEDS data set. Notice that the only drop-down option for Weight on the SDA Frequencies / Crosstabulation Program screen is No Weight.
For other data sets, it may be appropriate to apply a weight when running an analysis. Studies with one or more weight variables will have detailed weighting information available in the downloadable PDF codebook. Most SDA codebooks also have weighting information when applicable.
For data sets with only one weight variable, that weight variable will be the default option for Weight. To turn the weight off (not recommended), you have to select No Weight in the drop-down option for Weight.
For data sets with multiple weight variables, one of the weight variables will have been set up as the default option for Weight. However, you should always review the study documentation to determine which weight variable to select based on the variable(s) you have chosen to analyze. Once you have done this, select the appropriate weight variable from the drop-down list.
Please return to the browser window displaying the SDA Frequencies / Crosstabulation Program.
At the bottom of the SDA Frequencies / Crosstabulation Program screen there is a section labeled Table Options.
Remember that explanations for each option are displayed when you select the name of that option. For example, click on the word Percentaging for an explanation of what that option does.
For an example of how the options work, do the following:
In addition to the previous output for the crosstabulation of COKEFLG by GENDER, we now have:
Please return to the browser window displaying the SDA Frequencies / Crosstabulation Program.
In the bottom part of the SDA Frequencies / Crosstabulation Program screen there is a section labeled Chart Options.
Once again, explanations for each option are displayed when you select the name of that option. For example, click on the words Bar chart options for an explanation of those options.
For an example of how the options work, do the following:
The previous chart for the crosstabulation of COKEFLG by GENDER is now changed in the following ways:
This concludes the SDA tutorial. We plan on developing additional tutorials for other SDA analysis features in the future. In the meantime, there is additional online help in the form of the Users Guide, which provides basic information about all the features available in SDA.