Hi all:
Is it possible to use a user-defined missing value code (e.g., 999) for a date variable. When I attempt to define 999 as a missing value code SPSS responds that this is not possible. Thanks in advance! Scott ===================== 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 |
Administrator
|
Scott,
I don't believe it is possible to specify user missing values for date variables within the GUI. OTOH dates are simply large numbers representing the number of seconds since the onset of the GC. The following method will suffice to declare user defined missing values however 99 is *NOT* a valid value for a date field. HTH, David --- DATA LIST /mydate (ADATE). BEGIN DATA 06/26/2012 09/09/1899 . END DATA. IF SYSMIs(mydate) mydate=86400. MISSING VALUES mydate (10000540800,86400). FORMATS mydate (ADATE). FREQ mydate. MYDATE Frequency Percent Valid Percent Cumulative Percent Valid 06/26/2012 1 33.3 100.0 100.0 Missing 10/15/1582 1 33.3 09/09/1899 1 33.3 Total 2 66.7 Total 3 100.0 * To deduce 10000540800 from 09/09/1899 *. FORMATS mydate (f20.0). LIST.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Scott Roesch
Scott,
You can have 999 as a missing value provided it's in the same format as the date field you are trying to apply it to. For example, should your date format be in the British 4 format: dd.mm.yyyy click on the 'missing values' column for that variable like so: and make sure that your missing value is in the same format, here we see 01.01.0999 Hopefully this helps "Lo there do I see my father. Lo there do I see my mother and my sisters and my brothers. Lo there do I see the line of my people, back to the beginning. Lo, they do call to me, they bid me take my place among them, in the Halls of Valhalla, where the brave may live...forever." |
Administrator
|
That doesn't really count! 999 <> 01.01.0999!!!!!
SPSS dates begin on 1582 In fact the value 86400 is equal to 15-OCT-1582 00:00:00 so, does SPSS somehow recognize NEGATIVE date values in recent versions?
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
DM: "does SPSS somehow recognize NEGATIVE date values in recent versions?"
Nope! If I try to assign a value less than 86400 to a date variable (using v19), the result is SYSMIS. data list list / junk (f8.0). begin data 86400 86399 999 end data. numeric datevar (date11). compute datevar = junk. list. OUTPUT: junk datevar 86400 15-OCT-1582 >Warning # 1140 >The value to be output under one of the date formats is negative or has a date >part of zero. The result has been set to the system-missing value. 86399 . >Warning # 1140 >The value to be output under one of the date formats is negative or has a date >part of zero. The result has been set to the system-missing value. 999 . Number of cases read: 3 Number of cases listed: 3
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
Precisely my findings (thanks for the verification)!
86400 being the number of seconds in a day. (for those not familiar with date conversions and magic numbers)!!! Would be interesting if SPSS were to enhance date definitions (maybe a different origin concept than the Gregorian calender (arbitrary IMO)) so archeologists and historians would be able to use it effectively. Hell, it isn't even possible to track the dismal progress of the ExpLorOitation of the new world or the ages of the world's collection of mummies!!! --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
This post was updated on .
In reply to this post by David Marso
why on earth does spss only count from 1582?
and I got no errors from that missing value. Edit: Ok I understand now, gregorian calender etc. "Lo there do I see my father. Lo there do I see my mother and my sisters and my brothers. Lo there do I see the line of my people, back to the beginning. Lo, they do call to me, they bid me take my place among them, in the Halls of Valhalla, where the brave may live...forever." |
It's the start of the Gregorian calendar. A Monday if I recall, but those days are all so hazy now.
Many programs use 1582 as the starting point for counting dates because date math and manipulation requires some fixed point to reference, its an easy reference to use. It's not unique to SPSS, its pretty standard practice as I understand it. Matthew J Poes Research Data Specialist Center for Prevention Research and Development University of Illinois 510 Devonshire Dr. Champaign, IL 61820 Phone: 217-265-4576 email: [hidden email] -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tom1234 Sent: Wednesday, June 27, 2012 8:47 AM To: [hidden email] Subject: Re: missing values and date why on earth does spss only count from 1582? and I got no errors from that missing value. ----- "Lo there do I see my father. Lo there do I see my mother and my sisters and my brothers. Lo there do I see the line of my people, back to the beginning. Lo, they do call to me, they bid me take my place among them, in the Halls of Valhalla, where the brave may live...forever." -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/missing-values-and-date-tp5713807p5713823.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |
Administrator
|
In reply to this post by Tom1234
Looks like one can actually define missing values as such (01.01.0999) but you can simply *NEVER* use them. I think 09.09.9999 sticks out more anyway and you are not likely to collide with reality at any time before it becomes moot. OTOH: Who in there right mind actually analyzes *RAW* dates in the first place. Would be useful to know OP true intent WRT the initial motivation of question! Maybe JoNoH has some deep historical insights into that specific design decision (it has been that way since the devil was a little boy at least since say ver 4 -1999ish- on the Mainframe or maybe even before that). Basically EVERY piece of software MUST represent dates in some fashion, typically some number of some units since some -arbitrary and sometimes meaningful start date-in this case the Gregorian calender- see right sidebar of this for an interesting flash. http://en.wikipedia.org/wiki/Gregorian_calendar . If you want to whine about SPSS dates consider those SAS users ;-( http://www2.sas.com/proceedings/forum2008/168-2008.pdf "The first thing is of course that the SAS System stores dates, times and datetimes as numbers. Dates are counted in days from a zero point of January 1, 1960. Times are counted in seconds from a zero point of midnight of the current day, and datetimes are counted in seconds since midnight, January 1, 1960." OTOH, I did read elsewhere that SAS dates prior to 1960 are represented as *NEGATIVE* values but how confusing is that? <deliberate sleep deprivation induced SATIRE> If one goes prior to GC a tiny puddle of muck forms in the abyss WRT how long is a day/year? How to account for the missing 11 minutes per year in the Julian calender, how to line that all up with the scheduling of orgies, the brewing of mead ... One could wrongly date Pompeii by a matter of 10 whole days ;-))))) </dsdi-SATIRE>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Does that mean that SAS users born before 1960 were born in the year SYSMIS ? haha
"Lo there do I see my father. Lo there do I see my mother and my sisters and my brothers. Lo there do I see the line of my people, back to the beginning. Lo, they do call to me, they bid me take my place among them, in the Halls of Valhalla, where the brave may live...forever." |
Administrator
|
They just end up being negative ;-)
OTOH: That explains more than a few things !
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Tom1234
That is the year when the very first AbacuSPSS was invented by great great great great great…..great father of Norman H. Nie and brought to Americas by immigrant refugees or persecutions of the Church in Europe J why on earth does spss only count from 1582? |
Administrator
|
;-))))
http://www.hisdates.com/years/1582-historical-events.html No mention of Norman's GGGGGGGP or the mighty abacuSPSS... However, a young W. Shakespeare (18) married an pregnant older woman (26) and got jacked 40 pounds for a marriage license. Not much else happened in 1582 other than October having only 21 days. ---------------------
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |