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

st: RE: Variable number of matrixes as arguments


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Variable number of matrixes as arguments
Date   Tue, 19 Jul 2005 18:02:56 -0500

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Herb Smith
> Sent: Tuesday, July 19, 2005 5:36 PM
> To: [email protected]
> Subject: st: Variable number of matrixes as arguments

<snip>

> . program project
> .       args result history ratios years births
> 
> how can I see whether "matrix3" was passed to `births' or not?  I.e.,
> 
> . project matrix0 matrix1 matrix2 n matrix3
> 
> versus
> 
> . project matrix0 matrix1 matrix2 n        ?
> 

How about using an -if- statement.

	args result history ratios years births
	if "`births'" != "" {
		commands using `births' matrix
	}

> Similarly, how can I allow "n" not to be specified in the call line?
 
What is the basis of n?

Scott



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