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: AW: Tokenize local varlist


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Tokenize local varlist
Date   Tue, 13 Jul 2010 09:01:30 +0200

<> 

Has

*************
help unab
*************

been mentioned yet?




HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Dani Tilley
Gesendet: Dienstag, 13. Juli 2010 05:32
An: stata
Betreff: st: Tokenize local varlist

Hi,

I'm trying to use -token- on a varlist I defined, but it seems it's not
working 
as it should. I did the following:

local tvars prefix_*
token `tvars'
local regressand `1'
mac shift
local regressors `*'

So I try to assign all the variables that begin with "prefix_" to local
varlist 
tvars, and then I tokenize tvars and attempt to assign the first variable to

local regressand and the rest to regressors. However, when I -browse `1'-
after 
tokenizing tvars I get all the variables beginning with prefix_ (i.e. all 
tvars), and after I -ma s- and -browse `*'- I get all the variables in my
data 
set.

Any idea why this is happening?

Thanks in advance.

DFT



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


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