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

From |
David Kantor <kantor.d@att.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: use of if command after commands with options |

Date |
Thu, 31 Jul 2008 13:19:50 -0400 |

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/

**References**:**st: use of if command after commands with options***From:*"Stephan Rudolfer" <stephan.rudolfer@manchester.ac.uk>

- Prev by Date:
**st: Count no of unique occurrences in past 12 months** - Next by Date:
**st: Sample Selection in Panels And Stata** - Previous by thread:
**st: use of if command after commands with options** - Next by thread:
**Re: st: use of if command after commands with options** - Index(es):

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