Statalist


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

RE: st: AW: Keeping variable After restore


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: AW: Keeping variable After restore
Date   Mon, 9 Nov 2009 17:54:37 -0000

Gee, no sooner have you said that something is a not a good idea but someone wants to play with it. 

I said "together"! 

Nick 
[email protected] 

Martin Weiss

No complaints from Stata:

*************
cap pr drop myprog

pr myprog 
	vers 11
	syntax [if] [in], if(string)
	di in r "Content of if: `if'"
end

myprog, if(hello)
*************

Nick Cox

I don't think there is any rule against an option called -if()-. However, a programmer would have a hard time supporting -if- and -if()- together and it would generally be considered Bad Style. 

Maarten buis

That should read 
factor wbq91-wbq93 if year == 2005, factors(1)

Remember that -if- is never an option and should thus
appear before the ","

--- On Mon, 9/11/09, C.T. Shehzad wrote:
> However, stata says  "option if not allowed". It has
> happened before as well that conditionals do not work
> as option.
> 
> factor wbq91-wbq93, factors(1) if year == 2005
> option if not allowed
> r(198)


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


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

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index