Does this fix it?
....
substitute(_ \_ $ \\$ % \% ) ///
....
Regards, Sergiy Radyakin
On Thu, Nov 12, 2009 at 3:47 PM, Devra Golbe <[email protected]> wrote:
The following code using Ben Jann's wonderful -estout- (SJ) produces a
summary statistics table in latex format. The -substitute- option lets me
substitute "\%" for the "%" which appears in a variable label. I have not
been able to figure out what combination of compound quotes, etc. is
necessary to turn a "$" into a "\$". I suspect that Stata reads the dollar
sign in the -substitute- option as indicating an empty macro, but neither
that suspicion nor a search of the help files or web has turned up a
solution.
Thanks,
Devra
********************************
sysuse auto
label var price "Price ($), not (%)"
estpost summ price weight mpg
estimates store sum
estout sum, ///
title (Summary Statistics) ///
mlabels(, none) ///
cells ("mean (fmt(%9.2fc)) sd (fmt(%9.2fc )) count (fmt(%9.0f))")label ///
style(tex) ///
substitute(_ \_ $ \$ % \% ) ///
prehead(\begin{tabular}{ll*{3}{r}}) ///
posthead("\hline") prefoot("\hline") ///
postfoot(\hline\end{tabular})
******************
Devra Golbe
Professor of Economics
Hunter College /CUNY
695 Park Ave, NY, NY
*
* 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/