Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[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 <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index