[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Herve STOLOWY" <stolowy@hec.fr> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
Rép. : st: Re: Results displayed in parentheses after -matrix- |

Date |
Sun, 14 Dec 2008 10:38:02 +0100 |

Dear Martin: I start with your second question. In the help of -matrix-, your have -matrix utility-. Here you find: List contents of matrix matrix list mname [, noblank nohalf noheader nonames format(%fmt) title(string) nodotz] Here is what I called the "option format after matrix". Your first question: in a table, I display on the first line the mean and on the second line, the standard deviation. Traditionnally, in my field, standard deviations are displayed in parentheses. With the following command, I get the right table: ttest offer, by(info), if risk==0 & round>7 & round<26 matrix m_lowrisk1=r(mu_1), r(mu_2) matrix m_lowrisk2=r(sd_1), r(sd_2) ttest offer, by(info), if risk==1 & round>7 & round<26 matrix m_highrisk1=r(mu_1), r(mu_2) matrix m_highrisk2=r(sd_1), r(sd_2) ttest offer, by(info), if round>7 & round<26 matrix m_total_risk1=r(mu_1), r(mu_2) matrix m_total_risk2=r(sd_1), r(sd_2) matrix c3=m_lowrisk1 \ m_lowrisk2 \m_highrisk1 \ m_highrisk2 \ m_total_risk1 \ m_total_risk2 matrix list c3 ttest offer, by(risk), if round>7 & round<26 matrix m_total_info = r(mu_1), r(sd_1), r(mu_2), r(sd_2), ., . matrix m_total_info_v = m_total_info' matrix c4 = c3, m_total_info_v matrix rownames c4 = "Low risk (mean)" "(SD)" "High risk (mean)" "(SD)" "Main effect of risk (mean)" "(SD)" matrix colnames c4 = "Limited disclosure" "Full disclosure" "Main effect of disclosure" matrix list c4 mat2txt, matrix(c4) saving (table 3) title(Panel C: Mean (SD) - Offer, disclosure and risk) append I know that I can add the parentheses in the excel file. I was simply wondering whether it could be possible to get the parentheses automatically. Best regards Herve >>> "Martin Weiss" <martin.weiss1@gmx.de> 13/12/08 22:53 >>> The -format- command in Stata does not serve the same purpose as in, say, MS Excel. There you can define user defined formats that add things like parantheses around numbers. I have never seen anything like this in Stata. If you could give the list your reason for wanting this feature, someone may know a way around this problem... BTW, what is that "option format after matrix"? HTH Martin _______________________ ----- Original Message ----- From: "Herve STOLOWY" <stolowy@hec.fr> To: <statalist@hsphsun2.harvard.edu> Sent: Friday, December 12, 2008 11:11 PM Subject: st: Results displayed in parentheses after -matrix- > Dear Statalisters: > > I run a ttest and get some results in a matrix. > > ttest offer, by(info), if risk==0 & round>7 & round<26 > matrix m_lowrisk2=r(sd_1), r(sd_2) > > Is there a way to get r(sd_1) and r(sd_2) displayed in parentheses in the > matrix? > > I have seen the option format after matrix but I don't know how to use it. > > Best regards > > Herve Stolowy > > * * 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/

**Follow-Ups**:**st: Re: Results displayed in parentheses after -matrix-***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**Re: st: GLLAMM and weights** - Next by Date:
**st: Re: Results displayed in parentheses after -matrix-** - Previous by thread:
**st: GLLAMM and weights** - Next by thread:
**st: Re: Results displayed in parentheses after -matrix-** - Index(es):

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