05-13-2014 11:42 AM
I'm working through some code in an old program written by someone else, and I came across the following lines:
Proc Reg ... (where=(b1))...
Proc Syslin ... (where=(b3))...
I've searched the documentation and don't see any explanation regarding "where" statements in Proc Reg or Syslin or what b1 and b3 are (they are not variables in the models). Can anybody help me understand what "where=(b1)" or "where=(b3)" mean?
05-13-2014 11:58 AM
You didn't post a whole line of code but I will bet that the (where= (b1)) immediately followed the input dataset name. This is one of many dataset options that are universal that allow selecting data, variables and renaming variables at time of execution.
05-13-2014 12:23 PM
Some documentation on "where=(...)" data set option:
In your example if b1 is numeric it should either be:
a) "." (missing)
b) "0" (zero)
c) Any other number (e.g. 12, -77, etc.)
(a) & (b) would be equivalent to False (observation would not be used) and (c) would be equivalent of True (observation will be used).
E.g. the second data step uses "where=(age)" to only process a valid age value:
if name=:'J' then