Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: value labels, rename and merge


From   "Tomas Lind" <[email protected]>
To   <[email protected]>
Subject   st: value labels, rename and merge
Date   Mon, 12 Apr 2010 14:20:43 +0200

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index