Bookmark and Share

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]

st: Borrowed Mata code from an issue of Stata journal...but from which issue, exactly?


From   Matthew Baker <matthew.baker@hunter.cuny.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Borrowed Mata code from an issue of Stata journal...but from which issue, exactly?
Date   Wed, 20 Jun 2012 13:58:32 -0400

Dear Listers --

In the course of programming something awhile ago in Mata, I borrowed
some Mata code directly from the pages of the Stata journal. Now that
I'm trying to retrace my steps and give credit where credit is due, I
can't for the life of me find the source, and I was hoping that
someone out there will immediately recognize it and tell me where it
come from.

The code:

	V=J(x,x,1)
	V=J(rows(V),1,0),lowertriangle(V)
	MM=J(rows(V),1,.)
		for (j=1;j<=cols(V);j++) {
				info=cvpermutesetup(V[.,j])
				M=J(rows(V),1,.)
						while ((p=cvpermute(info)) !=J(0,1,.)) {
								M=M,p
										}
				M=M[.,2::cols(M)]
			MM=MM,M
								}
			MM=MM[.,2::cols(MM)]

Thanks!

Matt Baker

-- 
Dr. Matthew J. Baker
Department of Economics
Hunter College and the Graduate Center, CUNY
*
*   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   |   Site index