Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: value labels, rename and merge


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: value labels, rename and merge
Date   Mon, 12 Apr 2010 14:26:09 +0200

<> 


"?Rename- doesn´t seem to do its job properly with the value labels."


Just to be sure, Tomas, where does -rename- promise to change anything other
than the variable name?



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Tomas Lind
Gesendet: Montag, 12. April 2010 14:21
An: statalist@hsphsun2.harvard.edu
Betreff: st: value labels, rename and merge

Dear listers,

Problems with value labels, rename  and merge in Stata v10.

A software for making surveys on the web generates a small dataset with
variable- and value labels. Variable names are generic of the form Q1, Q2,
Q3 ? .Because many of names are already used in a large dataset (that we
have) we rename the variables wQ1, wQ2, wQ3 ? before merge. When we merge
the web dataset to the large dataset (merge webdata using largedata)  we get
a note from Stata that ?Label already exist Q1? (for a number of variables).
-describe- tell us that variables in the web-dataset have new variable names
but that the value-labels is associated with the old variable names!
?Rename- doesn´t seem to do its job properly with the value labels.

Also, when the webdataset is merged to the large dataset, value labels in
the web-dataset get its text from value labels in the large dataset. This
applies to all variables that shared the same name before being renamed. For
example value labels for wQ2 (a question about age) has value labels for Q2
(a question about food). What shall we do to get the value labels right? We
also want to use the web survey software in future studies. There is an
option ?nolabel- in the ?merge- command. However, that doesn´t help us. We
still get the wrong labels in -tabulate-. The same applies if we do a -label
drop- in the webdataset. It seems that the problem have something to do with
value labels from the web survey software that are connected to the wrong
variables. Any suggestions and ideas are welcome. 

/Tomas


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index