Tuesday, March 14, 2006

st: RE: Defining a matrix of Characters

Long route or short, you must use Mata for this.

Nick n.j.cox@durham.ac.uk

Siyam, Amani > Could you kindly tell me if it is possible to define a matrix > A[1x6] of > characters as follows: > > matrix A=[a b c d e f] > > I tried going the long route as follows: > > foreach i in a b c d e f { > gen `i'= "`i'" > } > mkmat a b c d e f , matrix(A) > > varlist: a: string variable not allowed > r(109); > > I got an error message as you can see...

* * 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/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?