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 <>
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: Richard.A.Williams.5@ND.Edu
WWW (personal):
WWW (department):

* For searches and help try:

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