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: AW: SV: AW: value labels, rename and merge


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: SV: AW: value labels, rename and merge
Date   Mon, 12 Apr 2010 15:06:46 +0200

<> 


Can you show this replication with datasets shipped with Stata?



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Montag, 12. April 2010 14:40
An: [email protected]
Betreff: st: SV: AW: value labels, rename and merge

Maybee it is not the responsibility of -rename- to fix this additional
stuff. But what should I do? -Rename- works fine with value labels when I
try to replicate the problem with a fake dataset so the problem seems to be
connected with the dataset originally produced by this web survey software.

/Tomas


-----Ursprungligt meddelande-----
Från: [email protected]
[mailto:[email protected]] För Martin Weiss
Skickat: den 12 april 2010 14:26
Till: [email protected]
Ämne: st: AW: value labels, rename and merge


<> 


"?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: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Montag, 12. April 2010 14:21
An: [email protected]
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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index