Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: matrix of significance stars


From   "Adam Seth Litwin" <aslitwin@MIT.EDU>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: matrix of significance stars
Date   Sat, 29 Jul 2006 12:41:42 -0400

Against everybody's better judgment, including my own, I am still trying to
do this by brute force.  I'm SO close though.

I now have a k x m matrix, where k is the number of independent variables
and m is the number of models I have estimated.  Each entry in the matrix is
a 0, 1, 2, or 3 based on how many stars I would like the estimate to carry.
(I built that matrix from a matrix of p-values.)

Now, I would like to read each of these matrix elements into a macro, and
then convert that macro to the appropriate string macro.  So, I have...

local indep1M1stars = stars[1,1]
if `indep1M1stars' == 3 local `indep1M1stars'  "***"
if `indep1M1stars' == 2 local `indep1M1stars'  "**"
if `indep1M1stars' == 1 local `indep1M1stars'  "*"
if `indep1M1stars' == 0 local `indep1M1stars'  

That works fine.  If I enter:
.di "`indep1M1stars'"

I get:
***

Fantastic.  BUT...
.file open faketable using filename, write replace
.file write faketable  `indep1M1stars'

does NOT write:
***

It still writes:
3

Do I need to reference indep1M1stars differently in the write command than
in the display command?

Thanks for suggestions.  This is really vexing me.  adam


----- Original Message ----- 
From: "Kit Baum" <baum@bc.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, July 29, 2006 6:31 AM
Subject: st: Re: matrix of significance stars


>
> findit estout
>
> Kit Baum, Boston College Economics
> http://ideas.repec.org/e/pba1.html
>
>
> On Jul 29, 2006, at 2:33 AM, Adam wrote:
>
>> I am trying to figure out the easiest way to build a matrix of 
>> significance
>> stars (or other symbols) after either an estimation command or,  better 
>> yet,
>> after building a table of estimates.  I figured there would be  something
>> like e(stars), especially since the estimates table can display  them so
>> readily.  But, short of -parmest-, which makes me build a whole new 
>> dataset,
>> I'm not sure how to proceed.
>
> *
> *   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/
> 

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index