Читать книгу Using Stata for Quantitative Analysis - Kyle C. Longest - Страница 19

A CLOSER LOOK: COMBINING DATA

Оглавление

Often when you are conducting analyses, you will need to expand your data set. Typically, this type of expansion involves one of two possibilities: (1) adding new cases to the data; or (2) adding new variables connected to existing cases. Combining data in either of these situations is not terribly complicated in Stata, but it is rather data-situation specific. Therefore, rather than fully covering the Stata commands to accomplish these tasks in detail, here I provide a general overview of when and why you might need to combine data in these ways, as well as noting the Stata command that allows you to do so. Because completing these types of data combinations is somewhat more advanced, I would encourage readers who realize they may need these commands to work their way through the book so that they feel comfortable with Stata. Then return to this section and combine it with the information in the Stata Help Files section of Chapter 8 to guide yourself through the exact command you will need for your particular data combination goals.

To fully understand the different types of data combinations that are possible, it may be helpful to use an example. Consider the data you have been working with so far in this chapter as your “original” data that may have come from a survey you conducted. Figure 1.7 presents the data as they are right now.


FIGURE 1.7 • ORIGINAL DATA

Using Stata for Quantitative Analysis

Подняться наверх