The following utilities are for the National Statistics Office Socio-Economic Survey Datasets.
addseslabels is a user written command that will add labels to all of the variables in the SES. Usually the researcher needs to add in whatever labels are required for their project. Adding all the labels at once makes this process much simplier and avoids confusion about meanings of different variables. If you are interested in using this utility, either put it in your current working directory or in your personal directory or in the plus/a/ directory. Once you are in Stata, you can just type addseslabels at the command prompt and all the variable labels will be added.
e.g. I am in the Stata command window, and I type
addseslabels
Suppose you have already typed in a lot of labels and you want to save a copy of them. Or suppose you want to take the labels you have created for one year and use them in another year instead? Or you want to share your labels with someone else on the same project?
This next utility takes your current labels and saves them to a file for later use. They are saved in a file called savevarlabel.do in your current working directory. Copy that do file and move it to where ever you want and run it like any other dofile.
To use this command, copy the below file into your personal folder (likely it is C:/ado/personal/) or into plus/s/ or into the current working directory. Then just type: savemylabels at the command prompt.
Here is a simple utility that looks for the do file called savevarlabel.do and if present it restores your labels. Usually you would type savemylabels at the command prompt which would save your labels, then do some transformation that results in your losing the labels such as using the collapse command. After collapsing the data you type restoremylabels at the command prompt to reinsert the labels.
To use this command, copy the below file into your personal folder (likely it is C:/ado/personal/) or into plus/r/ or into the current working directory. Then just type: restoremylabels at the command prompt.
Let me suggest that usually it is better to make a very clean copy of your data - Not the original data - that gets stored somewhere very safe. Then each time you use your dataset you add any changes you want using dofiles and Never Save Anything permanent into your clean copy.
For instance, you might re-add labels every time you use the dataset, and don't leave them stored in the dataset. This is not very important with labels, but when I'm adding new variables to my dataset I would rather do it with a dofile so I can use the clean dataset for something else later. Therefore I almost never save the dataset at the end of the session.
Stata สามารถอ่านภาษาไทยได้ Finally! In version 14 of Stata there is support for Unicode so finally everything we do in Stata can be in Thai - variable names - labels - everything. Now for the bad news - It is pretty buggy. I've been trying to work with it for the last couple of weeks, and things like cutting and pasting from excel are really rubbish. I actually think the fault may be with Excel which is often not in Unicode. For those of you who don't know, Unicode (charset=UTF-8) allows us to type in Thai as well as English whichi is why it is at the top of most webpages.
From my experience I encourage you to keep your variable names in English. However, labels could easily be in Thai since we won't normally need exact spelling with them.
It is beyond my language ability to get all the SES labels into proper Thai, but in case anyone feels like doing some editing to help the rest of us, I have taken the the addseslabels command above and run it through google translate and called it addthaiseslabels. Have fun with it. BTW, it won't work in Stata 13 or lower.
To use this command, copy the file into your personal folder (likely it is C:/ado/personal/) or into plus/a/ or into the current working directory. Then just type: addthaiseslabels at the command prompt.
By the way, if your browser insists on opening these commands in a window rather than downloading them, right click and use the saveas command to save them. You will have to delete the .txt extension if it has been added automatically.