hostmg.blogg.se

Stata label define
Stata label define




Remember, most of the time you will need only one quantitative variable. If you exported your data in long format (i.e. Tidy data), both Tableau and Excel will identify your qualitative variables as hierarchy levels so it will be easier to sort, plot or filter your results. In the example above, for example, we have three qualitative variables (i.e., country, year, and line) and one quantitative variable (i.e., poverty). Wickham ( 2014) call this type of data Tidy Data, which have a specific structure: each variable is a column, each observation is a row, and each type of observational unit is a table. Refers to allocating all qualitative information in independent variables and creating as few quantitative In contrast, with long-form formatting your data will be organized and easy to manage. Remember that the more levels your data have, the more confusing the names of your variables will be. Given the limitation of naming variables in Stata, it is also important to The poverty line and the year levels are not formatted in a way that Tableau or Excel can understand. Only level that is clear is country level. Know how many levels your data has, so you cannot construct a hierarchy.

stata label define

Variable called “p_25_2005” because only you know what that means. In wide form, is not useful to work with in Tableau or Excel for two reasons. How should you organize your results? You could organize your data in wide form so that your data would look something like this: Wide-shape table example countryĪlternative, you can organize your data in the long way, which would look like this: Long-shape table example countryĪs you can see, both tables have the same information but the data are arranged differently. You want to calculate the trends of poverty headcount over three years (2001, 2005, and 2010), for two different countries (Paraguay and Panama), using two poverty lines (2.5 USD and 4 USDa day, 2005 PPP). It is not only recommended that you have a plan before you start programing, it is a necessary step each time you need to plot something.

stata label define

In the following sections, we will see two basic “how” methods to store your information, but let’s focus for now on the “what” for now.įirst, even though it is obvious, you need to know what you want to calculate in order to plan your process. That is, before you start programing, you need to think about the final output. Long-shape formating Vs wide-shape formatingīefore you learn the “how-to” of exporting results, you need to understand the “what” of data formatting.






Stata label define