|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Mata question
Thanks.
Slide 27 clued me in. I'd not have figured that out, and I wish this
was more explicit in the manual.
Here's how it went starting outside mata...
. global vl2 "drug sex"
. mata
------------------------------------------------- mata (type end to
exit) ----------------------------
: X=st_data(.,tokens("$vl2"))
:
Paul
Martin Weiss wrote:
Make sure you take into account Kit Baum`s talk at the London UGM:
http://repec.org/usug2008/StataMata.beamer.UKSUG14.pdf
HTH
Martin
-------- Original-Nachricht --------
Datum: Fri, 14 Nov 2008 08:44:49 -0500
Von: "E. Paul Wileyto" <[email protected]>
An: [email protected]
Betreff: st: Mata question
I'm new to Mata, and just testing the waters.
As I read through the first of the Mata programming books, it is not
transparent to me how you take a macro /"varlist"/ and import the
variables as a matrix in Mata. Perhaps it is different in
non-interactive mode, but trying to use st_view and st_data
interactively seems to require that I have all sorts of punctuation
around each of the variable names, punctuation that cannot be preserved
and passed on in macroland. Is there a quick way of taking the usual
varlist macro and referring to it with st_data?
Thanks.
Paul
--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309
215-746-7147
Fax: 215-746-7140
[email protected]
*
* 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/
--
E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA 19104-3309
215-746-7147
Fax: 215-746-7140
[email protected]
*
* 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/