Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: quotes and double-quotes problems


From   Richard Williams <[email protected]>
To   [email protected]
Subject   st: quotes and double-quotes problems
Date   Thu, 28 Apr 2005 11:22:58 -0500

Stata drives me crazy with all its quotes and double-quotes. I am trying to get value labels returned the same way that mlogit does it, e.g. if the labels are

Very SD
Somewhat "D"
I `Strongly' Agree

(Labels deliberately chosen to cause as much trouble as possible.) mlogit will return in e(eqnames)

`"Very SD"' `""Somewhat" D"' `"I `strongly' agree"'

which will parse as 3 different words. Now, I know how to get the value labels, but I can't for the life of me get all the quotes and double-quotes right, e.g. I do something like

forval i = 1/3 {
local vlabel: label(`y') `i'
local vlabels `vlabels' `vlabel'
}


and it of course doesn't work right. But, I've also tried also sorts of combos involving `" and "' and it still never comes out right - I always wind up with extra or missing quotes and double-quotes. Any help would be appreciated.

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index