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

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



help unab

been mentioned yet?


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


I'm trying to use -token- on a varlist I defined, but it seems it's not
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
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'-
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

Any idea why this is happening?

Thanks in advance.


*   For searches and help try:

*   For searches and help try:

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