Statalist


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

Re: st:how to match created matrix to the original data set


From   Mandy fu <mandy.fu1@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st:how to match created matrix to the original data set
Date   Tue, 18 Aug 2009 16:01:35 -0400

Hi Tirthankar Chakravarty ,

Thanks for your response! The way you suggested works well.

By the way, may I know if you have any suggestion where I can find
more discussion/instruction on matrix operations? Before I sent out my
question, I have searched the manual and the online post. But did not
find the answer(For example, I found "rowsof()"; but I have not yet
seen using it after J). I think I must have missed some resource on
matrix commands in Stata.

Thanks again,
Mandy

On 8/18/09, Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> wrote:
> <>
>
> The last part can be done this way:
> ********************************
> mat define A=(2,2,2,2,2,2,2,2,2 \/*
>                */2,2,2,2,2,2,2,2,2 \/*
>                */2,2,2,2,2,2,2,2,2)
> mat list A
> mat A = (A, J(rowsof(A), 1, 1))
> mat list A
> ********************************
>
*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index