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.

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

From |
Scott Merryman <scott.merryman@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: Stata matrix to Mata matrix form - Turn lower diagonal matrix |

Date |
Thu, 1 Nov 2012 12:14:37 -0500 |

On Thu, Nov 1, 2012 at 11:46 AM, Bianca B. <bianca268@yahoo.com> wrote: > > mat_S2[1,2] is the name of the matrix. > > mat_S2 > > 1 2 > +---------+ > 1 | 0 | > | 1 0 > | > > >+---------+ > I found this old post > http://www.stata.com/statalist/archive/2007-02/msg00156.html > > where there is exactly my same question that is to turn my lower-triangular matrix, named mat_S2, into a symmetrical matrix by reflecting the lower triangular elements across the diagonal. > It already is - the upper triangle is not displayed but it does exist. For example: mata a = 0,1 \ 1,0 a a[1,2] a[2,1] vec(a) end Scott * * 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/

**References**:**Re: st: Re: Stata matrix to Mata matrix form***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: Re: Stata matrix to Mata matrix form - Turn lower diagonal matrix***From:*"Bianca B." <bianca268@yahoo.com>

- Prev by Date:
**Re: st: Re: Stata matrix to Mata matrix form - Turn lower diagonal matrix** - Next by Date:
**Re: st: skipping out of and restarting a loop if an error occurs** - Previous by thread:
**Re: st: Bivariate Granger Causality** - Next by thread:
**Re: st: appending two survey data sets** - Index(es):