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: Error arising using '&' in the cells option of -esttab-


From   Jamie Fagg <[email protected]>
To   [email protected]
Subject   st: Error arising using '&' in the cells option of -esttab-
Date   Mon, 17 Jan 2011 13:58:13 +0000

Dear Statalist,

First, Happy New Year. Secondly, I would appreciate advice about the following. I am running Stata SE 11.1 on Windows (32 bit). I am trying to use -esttab- (user written - by Ben Jann) to produce a table using the following code.

I have run the esttab command previously with Stata 10.1 using the code in snippet 1, and I'm sure that it worked. Specifically, I used an "&" symbol in the cells option to put the relative risk ratios and conflidence intervals in the same cell in the table in my rtf file. It was nice because it automatically put the RRR and CIs next to each other, rather than displayed vertically.

Since I've started using Stata 11.1, I have started getting the error seen at the bottom of snippet 1.

Extra details:
The command works when I remove the '&'
My do file uses the 'version 10.1' command at the start of the do file. The error remains without this code. I have checked that the installation of esttab is fully up to date as is the rest of Stata

I would appreciate any insights - ideally about whether I can get the command running as it did, or how to achieve the same results in the table.

Thanks for your consideration,

Jamie

***snippet 1: esttab with & option*****
**starts with last two coefficients from mlogit model of interest.

_Iqinc_4 | 1.317798 .0668328 5.44 0.000 1.193108 1.455519 _Iqinc_5 | 1.273542 .0733713 4.20 0.000 1.137558 1.42578
------------------------------------------------------------------------------

. est store Multivariate0407

.
. *format coefficients
.
. esttab  Multivariate* ///
>                 using Table3.rtf, eform aic label       varwidth(33)
>   ///
> title({\b Table 3: Multivariate analyses of bmi }) nostar ///
>                 mtitles("2000-2003" "2004-2007") ///
>                 cells (b(fmt(2)) & ci(par)) replace
_& invalid name
r(198);

**snippet 2 - without & option

. esttab  Multivariate* ///
>                 using Table3.rtf, eform aic label       varwidth(33)
>   ///
> title({\b Table 3: Multivariate analyses of bmi }) nostar ///
>                 mtitles("2000-2003" "2004-2007") ///
>                 cells (b(fmt(2))  ci(par)) replace
(output written to Table3.rtf)

--
MRC Centre of Epidemiology for Child Health
UCL Institute of Child Health
30 Guilford Street
London, WC1N 1EH

Tel - 0207 905 2320

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