The Drug and Alcohol Services Information System Report
 

March 15, 2002

 
Analyzing TEDS Online

In Brief

  • Over 75 studies, including the Treatment Episode Data Set from 1992 to 1999, are publicly available from the Substance Abuse and Mental Health Data Archive (SAMHDA) at www.icpsr.umich.edu/SAMHDA

  • Program administrators, researchers, and others with Internet access may run their own analysis without using specialized software

  • Hypertext links on the input screens provide online help
The Treatment Episode Data Set (TEDS) is a compilation of data on the demographic characteristics and substance abuse problems of those admitted for substance abuse treatment. The information comes primarily from facilities that receive some public funding. Information on treatment admissions are routinely collected by State administrative systems and then submitted to SAMHSA in a standard format. Approximately 1.6 million records are included in TEDS each year.

The 1992 to 1999 TEDS files are available through the Substance Abuse and Mental Health Data Archive (SAMHDA) and the archive's online data analysis system (DAS).1,2 In this report, we will demonstrate the DAS recode and compute procedures and the comparison of means function. For a more basic overview of the DAS, click here to see the report, "Accessing and Analyzing the NHSDA Online," or go to:  The recode and compute procedures allow users to temporarily store recoded or created variables on SAMHDA's web site. This is useful when you are running analyses over the course of several days or weeks. New variables are kept on the web site for 30 days after their last use. 3,4 Newly created variables are specific to the file for which they were created. For analyses across multiple years of a study, you must create the new variable for each year or file.

Both the recode and the compute procedures present the user with screens on which to enter the specifications for creating a new variable. The user enters the input variable name(s), the rules to convert one or more existing variables into a new variable, labels for the new variable(s), and other specifications. The recode or compute application then reads these specifications and carries out the data transformations.

Given the detailed geographic coding in TEDS, comparisons between geographic areas among several states or within the same state are possible. In doing these comparisons, it may be useful to create new variables. To illustrate, we will examine the variation of prior treatment episodes between Hispanics and non-Hispanics in New York State compared to the rest of the U.S. We will accomplish this in three steps using: (1) the recode procedure to collapse the existing ethnicity variable into two categories: Hispanic and Non-Hispanic; (2) the compute procedure to create another new variable with two categories, one for New York and one for all other states; and (3) the comparison of means function to determine the average number of prior treatments based on the two new variables. Access the DAS as follows:

  • Log on to the SAMHDA website: http://www.icpsr.umich.edu/SAMHDA.

  • Select Data Analysis System and follow the prompts to the 1999 TEDS until you reach the "SAMHDA SDA Archive" screen.

  • Refer to the online codebook for the original variable names, codes, and value (code) labels.

  • Click on the hypertext links found on each screen to obtain instructions and examples for any DAS procedure.

Step 1
The recode procedure combines codes from one or more existing variables into different groupings for a new variable. In our example, the codes and frequencies for the original Hispanic variable, which is named "ETHNIC," are shown in Figure 1. We see that the original variable includes four Hispanic categories and one category for non-Hispanic. Referring to these codes, we complete our first step of creating a new Hispanic variable:

From SDA Menu: Select the Recode Variables option. We will return to this menu to use "Compute a New Variable" and "Comparison of Means."
Figure 1. Input Variable: Ethnic
Figure 1. Input Variable: Ethnic

New Variable Name: Enter the new variable name; we call the new variable "HISP." You may choose to replace that variable if it already exists.5

Input Variables: Enter the original variable name in "Input Variable #1" (ETHNIC). In our example, we have only one input variable. The DAS is not case-sensitive regarding variable names.


Recoding Rules: Designate the new output codes and labels in this section along with the input codes for the recode. The input codes (1-4) for ETHNIC are collapsed to form the output code (1) for HISP. The input code (5) is used for the output code (0) for non-Hispanic and -9 is used for missing data for both the original and new variables.

Start Recoding: Click on this button to begin recoding. Figure 2 shows an excerpt from the recode input screen, while Figure 3 shows the new codes and frequencies.

Figure 2. Recode Input Screen
Figure 2. Recode Input Screen
Figure 3. New Output Variable: HISP
Figure 3. New Output Variable: HISP


Step 2
The compute procedure is designed primarily for manipulating variables mathematically. For example, you would use the compute procedure to create a new variable that is the sum of a set of existing variables by entering an algebraic expression to define the new variable. You may also use ‘if-then-else’ logic to collapse variables into a smaller number of categories, as with the recode procedure. This example illustrates that capability. The original variable for state (named “STATE”) includes 52 codes, one for each state, plus the District of Columbia and Puerto Rico. Again, -9 indicates that data are missing. In Step 2, compute a new variable called “NYSTATE” that includes two codes, one for New York and one for all other states:

From SDA Menu: Select Compute New Variable.

Expression to Define New Variable: Enter the command syntax directly into the“Expression” box. Refer to the Help links for syntax examples such as using ‘ge’ for ‘greater than or equal to.’

Options: Click on your preferences for replacing an existing variable and handling missing data codes.

Category Labels: Specify the new labels for each code.

Start Computing: Click on this button to begin the computations. Figure 4 shows an excerpt from the compute input screen and Figure 5 shows the new codes and frequencies.
Figure 4. Compute Input Screen
Figure 4. Compute Input Screen
Figure 5. New Output Variable: NYSTATE
Figure 5. New Output Variable: NYSTATE

Step 3

Figure 6. Comparison of Means Input Screen
Figure 6. Comparison of Means Input Screen
Our final step is to use the comparison of means function to examine differences in the average number of prior treatments among Hispanics and non-Hispanics in New York compared to the rest of the U.S.:

From SDA Menu: Select Comparison of Means.

Dependent Variable: Enter the variable name for number of prior treatment episodes, which is NOPRIOR.

Row/Column Variables: Enter HISP as the row variable and NYSTATE as the column variable.

Main Statistic: Accept the default of Means.

Other Options: Choose your preferences for other options; we have chosen color-coding and the T-statistic. Optional statistics such as analysis of variance and confidence intervals also may be selected. Figure 6 shows an excerpt of the input screen.


Results

Figure 7. Comparison of Means Results
Figure 7. Comparison of Means Results
The color-coding shown in Figure 7 is based on the T-statistic for each cell and represents the observed differences for the average number of prior treatments. The red boxes indicate that the means are larger than the overall average and the blue boxes indicate the means are smaller than the overall average. We see from the T-statistics and the color-coding that the differences between the cells is statistically significant, with the mean number of prior treatments in New York (1.82) being larger than the overall mean for the rest of the U.S. (1.42). We also see that the highest average number of prior treatment episodes observed for any cell was for non-Hispanics in New York (1.86).6 Other TEDS variables, such as race and primary substance of abuse, could be used to further explore differences among treatment admissions.


Additional Information
For additional information about the DAS or the databases publicly available from the archive, email: samhda@icpsr.umich.edu or phone toll-free (888) 741-7242.


End Notes

1The archive is supported by the Office of Applied Studies at SAMHSA and based at the Inter-university Consortium for Political and Social Research (ICPSR) through a subcontract with the National Opinion Research Center at the University of Chicago (NORC).

2The DAS is based on the Survey Documentation and Analysis (SDA) software developed at the Computer-assisted Survey Methods Program (CSM) at the University of California at Berkeley.

3Note that recodes may also be done “on the fly” within the analytic programs. However, this option requires input for each analytic screen and is limited to recodes of a single variable.

4You may want to print your input screens or save your syntax in a text file to recreate the variable(s) if you do not plan to use your created variables within 30 days.

5 You may use the recodes that others have created and you may choose to overwrite your own recodes, but please do not overwrite the recodes of other users. Select the “List user-created variables in temporary storage area” on the SDA menu to view variables already created.

6 The variable NOPRIOR (number of prior treatments) was top-coded to group together 5 or more prior treatments as a single interval amount of 5. This has the effect of bringing the mean slightly downward.

The Drug and Alcohol Services Information System (DASIS) is an integrated data system maintained by the Office of Applied Studies, Substance Abuse and Mental Health Services Administration (SAMHSA). One component of DASIS is the Treatment Episode Data Set (TEDS), a national-level dataset comprising State administrative data primarily from treatment facilities receiving public funds. The TEDS system includes records for some 1.6 million substance abuse treatment admissions annually. TEDS records represent admissions rather than individuals, as a person may be admitted to treatment more than once. 

The DASIS Report is prepared by the Office of Applied Studies, SAMHSA; Synectics for Management Decisions, Inc., Arlington, Virginia; and RTI, Research Triangle Park, North Carolina.

Information and data for this issue are based on data reported to TEDS through April 16, 2001.

Access the latest OAS reports at:
www.oas.SAMHSA.gov

Access the latest TEDS reports at:
http://www.oas.samhsa.gov/dasis.htm

Access the latest TEDS public use files at:
http://webapp.icpsr.umich.edu/cocoon/SAMHDA-SERIES/00056.xml


The DASIS Report is published periodically by the Office of Applied Studies, Substance Abuse and Mental Health Services Administration (SAMHSA). All material appearing in this report is in the public domain and may be reproduced or copied without permission from SAMHSA. Additional copies of this report may be downloaded from http://www.oas.samhsa.gov/facts.cfm. Citation of the source is appreciated.
Other reports from the Office of Applied Studies are also available on-line at the OAS home page: http://www.oas.samhsa.gov.

 

Other reports from the Office of Applied Studies are also available on-line: http://www.oas.samhsa.gov.


This page was last updated on December 31, 2008.