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, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Tokenize local varlist

From   Dani Tilley <>
To   stata <>
Subject   st: Tokenize local varlist
Date   Mon, 12 Jul 2010 20:32:07 -0700 (PDT)


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 

Any idea why this is happening?

Thanks in advance.


*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index