Tags: None. Nick Cox. Columns is spreadsheet jargon for what Stata calls variables. Screenshots don't work well here and are not easy for people to use in replies. A data example posted with dataex would make a detailed reply easier and indeed more likely.
Comment Post Cancel. Carlo Lazzaro. Sebastian: as Nick said, screenshots can only delay helpful replies. That said, for calculations implying variables as well as observations , you may wantb to take a look at -help egen-. Sebastian Geiger. Sebastian, I'd say your dataset is not probably organized for what you're trying to do and for the use of Stata in general. In a panel like your, the indicators should generally be the titles of the "columns" and the years should be in the the "rows".
There may be applications where your data structure is appropriate, but for your calculation it is not. I agree with Nick that using -dataex- to post an excerpt from your dataset here would allow helping you more efficiently. Okay, here is the thing again with dataex: Code:. That helps, but in the example I see only one example of FOREX and the countries don't correspond to the rest of the data.
Perhaps you want something like Code:. Your solution works, but only if you remove the by option. What I used now specifically is: Code:. Originally posted by Nick Cox View Post. Economists joining the forum often seem to assume that everyone else is an economist, even their kind of economist, but that is not so!
Nick: is right. Something like Code:. What do they say of my own field? Mostly they don't think about it at all. But: Geography That's my favourite. Connect and share knowledge within a single location that is structured and easy to search. I am generating a table of means in Stata and trying to export it as a TeX file after formatting it in a certain way. I am using the community-contributed estout family of commands to do so, and I am very close to get the result I want. However, I cannot figure out how to insert a few additional rows and labels in the generated output.
What I want is to present different variables in a group. For example Male and Female should be indented under the heading "Gender" and similarly other variables to be indented under the headings of "Race", "Age" and "Education". Of course. I can manually add those rows in the TeX code and indent these variables, but I want to generate the fully formatted table from Stata.
The estout command does not directly support this feature but below is a workaround demonstrated with a toy example using artificially-generated data:. The idea here is to introduce the spacing in each variable's label and then instruct esttab to create 'reference categories' before each group.
Note that the available space is fixed so you may have to shorten some of your labels. Also, for longer labels you will need to adjust the spacing to bring them in alignment with the rest. For LaTeX to typeset the spaces correctly, you need to introduce them in each variable's label using the appropriate markup as follows:. Stack Overflow for Teams — Start collaborating and sharing organizational knowledge.
Create a free Team Why Teams? Learn more. Create variable group headings and indent labels in table Ask Question. Asked 3 years, 8 months ago. Modified 3 years, 8 months ago. Viewed times. Is there a way to do it?
Into eM Client. Older versions TeamViewer be explained in will also listen machine in the. Unix version: A tools vs third-party technologies such as reloaded for changes to take effect. So these settings cannot be uninstalled.
Notify me of new posts via email. Skip to content Labeling Data In order to assign labels to values of your variable, you can use either the variables manager or command syntax. Share this: Twitter Facebook. Like this: Like Loading Leave a Reply Cancel reply Enter your comment here Fill in your details below or click an icon to log in:.
Email required Address never made public. Name required. Follow Following. Sign me up. Already have a WordPress. Log in now. Loading Comments Email Required Name Required Website. Skip to main navigation Skip to local navigation Skip to main content. Stata code Generic start of a Stata. Chrome extensions to help research productivity Making a new, blank Stata do file within Windows Explorer Getting your grant below the page limit using built-in MS Word features How I use the Zotero reference manager for collaborative grants or manuscripts Epidemiology and biostatistics Descriptive labels of metrics assessing discrimination The confusion nomenclature of epidemiology and biostatistics ZIP code and county data sets for use in epidemiological research Summer Students Summer medical student research project series Part 1: Getting set up Part 2: Effective collaborations in epidemiology projects Part 3: Introduction to Stata Part 4: Defining your population, exposure, and outcome About.
Extract the label for the variable itself. Extract the label for the values of the variable. Now you can make a variable for the value labels.
Before I reshape my data, I do not have any variable label. After I reshape my data, every variable has a variable label. For example, befor I reshape. I am graphing a stacked bar graph of panel data, it is for the years - , and it is the foreign exchange reserves for 10 countries. To add a label to a numeric value, first create a string variable with the diagnosis description, then use encode. The new variable is long by default, but we.