|
|||
|
Now, try it with a special missing value ...
DATA _NULL_; MisMis = ._ EQ -._; * -. is not the missing value ._; MisMis0 = 0 * (._ EQ -._); * and neither the Morse code for N; MisMis1 = 1 * (._ EQ -._); * it is: minus the missing value .; PUT (_ALL_)(=); RUN; In SAS 9.1.3, WinXP, produces: MisMis=0 MisMis0=0 MisMis1=0 As a clue, it also produces: NOTE: Missing values were generated as a result of performing an operation on missing values. In terms of "the meaning of a negative missing value" -- the minus sign (-) is an operator, just as the * and EQ are. Attempting to perform an arithmetic operation such as negation on any missing value results in a "standard" missing value (.). In SAS, however, the result of an equality test is always true or false (1 or 0). Mike Rhoads Westat RhoadsM1@Westat.com -----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto wner-sas-l@listserv.uga.edu]On Behalf Of Jim Groeneveld Sent: Wednesday, June 28, 2006 10:13 AM To: SAS-L@LISTSERV.UGA.EDU Cc: Jim Groeneveld Subject: SAS 8 vs. 9 incompatibility Hi friends, Run the following test program in both SAS vs. 8 and SAS vs. 9 if you can and have a look at the difference. DATA _NULL_; MisMis = . EQ -.; * -. is not the missing value ._; MisMis0 = 0 * (. EQ -.); * and neither the Morse code for N; MisMis1 = 1 * (. EQ -.); * it is: minus the missing value .; PUT (_ALL_)(=); RUN; SAS vs. 8 yields: MISMIS=1 MISMIS0=. MISMIS1=. while SAS vs. 9 yields: MISMIS=1 MISMIS0=0 MISMIS1=1 You could question the meaning of a negative missing value, but given the first value I think SAS vs. 9 is correct with the two other values and SAS vs. 8 is not. Where I work now (on secondment) they changed from SAS 8 to SAS 9 today. Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld |
|
|
||||
|
||||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: SAS 8 vs. 9 incompatibility | Jim Groeneveld | Newsgroup comp.soft-sys.sas | 0 | 06-29-2006 09:08 AM |
| Re: SAS 8 vs. 9 incompatibility | Venky Chakravarthy | Newsgroup comp.soft-sys.sas | 0 | 06-28-2006 04:59 PM |
| Re: SAS 8 vs. 9 incompatibility | Phil Rack | Newsgroup comp.soft-sys.sas | 0 | 06-28-2006 02:48 PM |
| SAS 8 vs. 9 incompatibility | Jim Groeneveld | Newsgroup comp.soft-sys.sas | 0 | 06-28-2006 02:13 PM |