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]

Re: st: set value to zero in a Matrix


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: set value to zero in a Matrix
Date   Tue, 5 Mar 2013 12:47:11 +0000

One possibility is that you are going to need an e-class program that
emits a changed matrix.

I don't use -esttab- (SSC) so can't advise. (Please remember to
explain where user-written programs come from.)

As I don't really approve I am not volunteering!

Nick

P.S. At worst this is a nested loop, e.g.

mata :
y = runiform(5,5)

for(i = 1; i <= rows(y); i++) {
         for(j = 1; j <= cols(y); j++) {
                 if (y[i,j] < 0.1) y[i,j] = 0
         }
}

y
end


On Tue, Mar 5, 2013 at 12:22 PM, Jörg Eulenberger <[email protected]> wrote:

> i have a problem with matrix.
> After a factor analysis i want tabulate the results (varimax with
> blanks) with esttab.
> But the Matrix "e(r_L)" include all value.  For esttab, i want set the
> value smaller than .04 to zero (like the blanks-subcommand).
> i found functions like mm_cond and mf_editvalue but nothing works.
>
> Any suggestions?
>
> **********
> use "http://www.ats.ucla.edu/stat/stata/output/m255";, clear
> factor item13-item24, pcf
> rotate, varimax horst blanks(.4)
> matrix list e(r_L)
> esttab, cells("r_L[1](t label(Factor 1)) r_L[2](t label(Factor 2))")
> nogap noobs nonumber nomtitle label
>
> ******************

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index