Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Copying matrices


From   [email protected]
To   [email protected]
Subject   st: Copying matrices
Date   Mon, 19 Aug 2002 14:27:14 +0100

> -----Original Message-----
> From:	Fergusson, Chris (WPH Cancer Registry) 
> Sent:	19 August 2002 14:25
> To:	'[email protected]'
> Subject:	Serial number:  1970515440
> 
> I have a program which produces a matrix (easr) size x*1 where x is even,
> no larger than 32 and variable depending on user input.  I need to take
> the first x/2 observations enclosed in the matrix and save them in another
> matrix (botheasrm) and the second x/2 observations need to go in another
> matrix (botheasrf).  To correctly do the first part I used the code
> 
> matrix define botheasrm = J(`count'/2, 1, 0)
> 
> forvalues i = 1/`z' { 
> 	forvalues j = 1/1 { 
> 		matrix botheasrm[`i',`j']= easr[`i',`j'] 
> 	} 
> 
> where z is x/2 previously defined.  However I am having trouble copying
> the second half of the matrix and any help would be appreciated.
> 
> Thanks in advance,
> Christopher D Fergusson
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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