Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: functions with a variable list of inputs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: functions with a variable list of inputs
Date   Tue, 29 Mar 2005 12:03:34 +0100

I feel the need for more precision here. 

For a start, it is not clear to me how literally 
to take your use of the word "functions". 

On one reading of this you in fact 
mean "programs". In that case, you should
study documentation for the -syntax- command
and how varlists are handled. 

Nick 
[email protected] 

Florence Neymotin
 
> I have a couple of questions about functions that I thought 
> someone might
> be able to help me with:
> 
> suppose I have a variable list that I don't know it's length, 
> is there an
> easy way to code it as a parameter so that when they run the 
> function, it
> can recognize a non-specified number of variables...i.e. I 
> want to create
> a matrix of observable characteristics such as "age, education, race,
> religion", and call them x1 x2 x3 x4 but I want the user to have
> discretion over how MANY x variables will be input. I'm not 
> sure exactly
> how to code this...

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