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]
Re: st: RE: submatrix
behailu ayele <firstname.lastname@example.org>
Re: st: RE: submatrix
Tue, 15 Nov 2011 11:20:25 +0000
Dear Nick and Statalisters,
Is there anyway, then, I can actually restructure my initial matrix in
a way that it has the dimensions I want (9 by 9) instead of one single
On 11/15/11, Nick Cox <email@example.com> wrote:
> Yes; Stata can only regard it as an error if you refer to rows and/or
> columns that don't exist.
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com] On Behalf Of behailu ayele
> Sent: 15 November 2011 10:56
> To: firstname.lastname@example.org
> Subject: Re: st: RE: submatrix
> Thanks very much. I now went to matrix extraction and I think know my
> problem, now. My estimation result reads only as row. Whatever I want
> to extract,, it works when I specify as one row and any number of
> columns. What I mean is, it works when I do either of these:
> matrix A = b[1, "b1".."b9"]
> matrix A = b[1, "a1".."a9"]
> but it says conformability error whenever I do
> matrix A = b[1..2, "a1".."a9"]
> I am thinking I need to restructure my estimation result such that it
> is a proper matrix to begin with (with 9 by 9 dimension) and not just
> a matrix with one row and several columns.
> Thankyou again.
> On 11/15/11, Nick Cox <email@example.com> wrote:
>> This is covered by the help on -matrix extraction-
>> matrix new = b[1..9, 7..9]
>> The = operator for assignment should be used (not ==).
>> behailu ayele
>> I have problem extracting parts of a matrix I estimated.
>> my matrix e(b) is 9 by 9. Now I want to extract the first line and I did
>> matrix b=e(b)
>> and then
>> matrix new==b[1,1..9]
>> my problem is when i want to have a 3 by 9 matrix of the last three
>> is this not what I am supposed to do?
>> matrix new==b[7/9,1..9]
> * 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/
* For searches and help try: