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: AW: Detach value label from string var


From   "Kaulisch, Marc" <[email protected]>
To   <[email protected]>
Subject   st: AW: AW: Detach value label from string var
Date   Tue, 6 Apr 2010 18:16:42 +0200

We import our data by a XML-file where <lbllist> is given for all vars (e.g. <lblname varname='BN15_2__5'>BN15_2</lblname>) despite (non-)existing value labels defined under <value labels>.

A trick would be to remove the value labels for all string vars in the XML-definition <lblname>. I hoped to do this by a Stata command and not going back to our contractor changing the export-mechanism...

Marc

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Martin Weiss
Gesendet: Dienstag, 6. April 2010 16:35
An: [email protected]
Betreff: st: AW: Detach value label from string var


<> 


What does "importing a dataset" mean? The effect does not seem to occur
here:


*************
sysuse auto, clear
outsheet using myfile.csv, comma replace
clear*
insheet using myfile.csv, comma clear
d
la dir
codebook, p
*************

-codebook- returns "make" as a "string var with embedded blanks", but how is this issue connected to any -label-?


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Kaulisch, Marc
Gesendet: Dienstag, 6. April 2010 15:32
An: [email protected]
Betreff: st: Detach value label from string var

Another problem I cannot solve myself:
By importing a dataset all variables get label values attached - also string vars. This leads to "string vars with embedded blanks" by codebook, p.

For numeric vars with empty value labels I used:
. label values `r(labelnotfound)' .

But
. label values `r(str_embedded)' .
does not work. 

I even can not do this via the Variables Manager. Any idea how to do this?



*
*   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