[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: use of if command after commands with options
You need to either put the -if- qualifier before the comma:
pca... if x==1, comp(6)
or put it at the end, after a second comma:
pca... , comp(6), if x==1
Commands have a "main" part and an "option" part. The comma switches
back and forth between these two parts.
HTH
--David
At 01:03 PM 7/31/2008, Stephan Rudolfer wrote:
I wish to use the if command to select a subset for estimation
purposes, but also use options for the main command. This doesn't
seem to work, since stata thinks that "if" is a further option. For
example, pca..., comp(6). If I follow this with "if x==1", it won't
work because stata thinks that "x==1" is a further option for pca.
*
* 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/