Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: set value to zero in a Matrix

 From Nick Cox To statalist@hsphsun2.harvard.edu 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.

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 <j.eulenberger@web.de> 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/
```