Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: re: general varlist in programs


From   Kyle Hood <[email protected]>
To   [email protected]
Subject   Re: st: re: general varlist in programs
Date   Mon, 21 May 2007 18:58:43 -0400 (EDT)

This is not the problem. I essentially unabbreviated the list in my loop before passing it to the program, which worked. I never refer to "`varlist'", anyway, simply to the variables in the local macros `1', `2', etc. Also, it's being used for an nl procedure. Maybe I should have mentioned that. That's probably what the issue is, but it's not a problem anymore.

Thanks for all of your help.

Kyle




On Mon, 21 May 2007, Michael Blasnik wrote:


...
Let me add to this - the error is probably arising somewhere in your program when you refer to "`varlist'" and expect it to be fully expanded into a list of variables rather than still being in it's varlist state. You may want to check out the -unab- command to unabbreviate and expand the varlist and place that tokenized list in a local macro.

Michael Blasnik

----- Original Message ----- From: "Michael Blasnik" <[email protected]>
To: <[email protected]>
Sent: Monday, May 21, 2007 5:47 PM
Subject: Re: st: re: general varlist in programs...

You've made a typo or some other error -- the syntax for varlist has accepted wildcards as far back as I can recall (Stata for DOS anyone?).

----- Original Message ----- From: "Kyle Hood" <[email protected]>
To: <[email protected]>
Sent: Monday, May 21, 2007 4:07 PM
Subject: Re: st: re: general varlist in programs



I guess they must have improved things from v8 to v9, or there is something I am doing that is wrong.

The workaround that I am using is to employ a foreach var of varlist ... loop, concatenating the variable names into a local variable. Maybe it would be best for me just use stata 9, though.
*
*   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/

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index