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


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

st: syntax behaving differently


From   tashi lama <ltashi32@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: syntax behaving differently
Date   Tue, 7 Aug 2012 18:15:08 +0000

I have a dataset
var1 var2 var3 |
|-----------------------|
| Tom 1 5 |
| Jane 2 6 |
| Suzanne . 7 |
| Henry 4 8 |
| Mike 9 9 |
and my ado file is following
program tt1
syntax [varlist] [if] [in]
marksample touse
list `varlist' if `touse'
end
exit
1. when I say tt1 var1, it doesn't list anything. Is it because var1 is string?Even it is, I haven't limited by varlist to not be string. Any clue/
2. when I say tt1, it doesn't list anything. Is it not supposed to list var1var2 and var3 since I have enclosed varlist with [] stating varlist to be optional. Any clue?
3. when I say tt1 var2, it lists var2 but ignores missing obs. Is there anoption to include both missing and nonmissing?
Thanx... 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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