|
dear listers,
I've seen a strange behaviour in SPSS about a sysmis var * valid value. If you try to multiply 0*sysmis = 0 1*sysmis = sysmis It isn't strange? or clear? Thanks in advanace for your help! ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hello Cristiano,
SYSMIS is not a value to be used in calculation (musch like NULL in databases). The behaviour is undefined. 1 times something equals something provided that somethings is something specific. However 0 times something always equals 0. Hence 0 * sysmis = 0 and 1 * sysmis = sysmis. We all know that sysmis has in fact some value (often as many 9's as fits in the variable or the date some pope decided to change the calender), but that is not a value tu be used in calculations. You might change the word 'sysmis' with 'I don't know'. And what about 2 / sysmis ?? suppose the sysmis would equal 0?? or infinit?? I presume sysmis is most often used to filter cases or to count or sum up values provided they exist. About NULL ans SYSMIS whole libraries of scientific books could be written... Just my two eurocents. Kees de Boer Amsterdam ________________________________ Ing. C.P.J. (Kees) de Boer EMGO, VUmc Datamanagement & Systeembeheer D-451 tel. 020-44 49828 "Geloof: Geloven zonder bewijs in wat iemand die spreekt zonder kennis heeft gezegd over zaken die onvergelijkbaar zijn." Ambrose Bierce -----Oorspronkelijk bericht----- Van: SPSSX(r) Discussion [mailto:[hidden email]]Namens Cristiano Verzonden: vrijdag 30 november 2007 10:26 Aan: [hidden email] Onderwerp: var1*sysmis dear listers, I've seen a strange behaviour in SPSS about a sysmis var * valid value. If you try to multiply 0*sysmis = 0 1*sysmis = sysmis It isn't strange? or clear? Thanks in advanace for your help! ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
In reply to this post by cristiano1974
This is documented behavior (see the Command Syntax Reference manual under Transformation Expressions) where it says...
Some arithmetic operations involving 0 can be evaluated even when the variables have missing values. These operations are: Expression Result 0 * missing=0 0 / missing= 0 MOD(0,missing)= 0 (Of course sysmis * x when x is not zero = sysmis) This is reasonable if you assume that sysmis is finite, and it is often used that way, but since x/0 = sysmis, it isn't necessarily finite. Personally, I'd have made all the results above sysmis, but the current behavior is long established and unlikely to be changed. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Cristiano Sent: Friday, November 30, 2007 2:26 AM To: [hidden email] Subject: [SPSSX-L] var1*sysmis dear listers, I've seen a strange behaviour in SPSS about a sysmis var * valid value. If you try to multiply 0*sysmis = 0 1*sysmis = sysmis It isn't strange? or clear? Thanks in advanace for your help! ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
A rule you can use when writing transformations is that SPSS will do the right thing where the question applies but the answer is not given. No logic need be added to cover that case. If the question does not apply, then the transformation code must be wary about using the answer.
Jonathan Fry SPSS Inc. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Peck, Jon Sent: Friday, November 30, 2007 9:06 AM To: [hidden email] Subject: Re: var1*sysmis This is documented behavior (see the Command Syntax Reference manual under Transformation Expressions) where it says... Some arithmetic operations involving 0 can be evaluated even when the variables have missing values. These operations are: Expression Result 0 * missing=0 0 / missing= 0 MOD(0,missing)= 0 (Of course sysmis * x when x is not zero = sysmis) This is reasonable if you assume that sysmis is finite, and it is often used that way, but since x/0 = sysmis, it isn't necessarily finite. Personally, I'd have made all the results above sysmis, but the current behavior is long established and unlikely to be changed. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Cristiano Sent: Friday, November 30, 2007 2:26 AM To: [hidden email] Subject: [SPSSX-L] var1*sysmis dear listers, I've seen a strange behaviour in SPSS about a sysmis var * valid value. If you try to multiply 0*sysmis = 0 1*sysmis = sysmis It isn't strange? or clear? Thanks in advanace for your help! ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
