LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Nov 2011 10:46:06 -0700
Reply-To:     J McClure <mc006@pacbell.net>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         J McClure <mc006@pacbell.net>
Subject:      Re: Compute command and System User missing
In-Reply-To:  <BLU143-W152DE7C9157CC5A55B2C5897D50@phx.gbl>
Content-Type: text/html; charset=ISO-8859-1

<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi,<br> Sorry, I see that I wasn't specific.<br> The results of the code I posted are 10 cases that fall into the category of 8.&nbsp; I am using 8 only to see where my code does not work. In other words, if there are any '8' s in my new variable I did something wrong.<br> I traced the source of my 10 cases that were incorrectly coded as an '8' to the variable h_12mo which has 7 cases that are user missing (coded as 99) and 3 cases that are system missing.&nbsp; <br> In the new variable I want the user missing to be a 98 and the system missing to still be system missing.<br> Thanks,<br> Jan<br> <br> On 11/3/2011 10:37 AM, Rich Ulrich wrote: <blockquote cite="mid:BLU143-W152DE7C9157CC5A55B2C5897D50@phx.gbl" type="cite"> <style><!-- .hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 10pt; font-family:Tahoma } --></style> <div dir="ltr"> You are not totally explicit about what the problem is.<br> Presumably, "eq 99" does not work because 99 is missing.<br> <br> One obvious correction is to un-MISS&nbsp; 99 for H_12mo&nbsp; before the <br> computation (using MISSING VALUES h_12mo ( ) ); and re-instate<br> it at the end.&nbsp; The more direct correction uses the SYSMIS( ) <br> function.<br> <br> Apparently, you want the value to be 98 if H_12mo was 99,<br> and 8 if it was SYSMIS.&nbsp; Thus -- make the initializing of Hosp<br> set it to 98; and change the test at the end to <br> <br> IF&nbsp;&nbsp; SYSMIS(H_12mo)&nbsp; hosp= 8.<br> <br> &nbsp;- If there is a function that tests for MISSING, but not SYSMIS,<br> you could use that one in place of the present test on 99.<br> But I don't remember that name, and quick Googling doesn't <br> show it to me.<br> <br> -- <br> Rich Ulrich <br> <div>&gt; Date: Thu, 3 Nov 2011 12:26:12 -0400<br> &gt; From: <a class="moz-txt-link-abbreviated" href="mailto:mc006@PACBELL.NET">mc006@PACBELL.NET</a><br> &gt; Subject: Compute command and System User missing<br> &gt; To: <a class="moz-txt-link-abbreviated" href="mailto:SPSSX-L@LISTSERV.UGA.EDU">SPSSX-L@LISTSERV.UGA.EDU</a><br> &gt; <br> &gt; Hi,<br> &gt; I'm a doctoral student (epidemiology)and have not used SPSS in awhile. I'm<br> &gt; trying to do something quite simple but am running into a problem with<br> &gt; system missing and user missing values.<br> &gt; Old variables are H_now (no missing values) and H_12mo which has 3 system<br> &gt; missing and 7 user missing (99).<br> &gt; I want to create a new variable (hosp). I set the new variable to 8 so that<br> &gt; any cases that "fall thru" will be evident to me. Indeed, 10 cases fall thru<br> &gt; and are listed as an "8". These are the 3 sysmis and the 7 user missing (99).<br> &gt; compute hosp=8.<br> &gt; if H_now EQ 1 hosp = 1.<br> &gt; if (H_now EQ 0 and H_12mo EQ 1) hosp = 2.<br> &gt; if (H_now EQ 0 and H_12mo EQ 0) hosp = 3.<br> &gt; If H_12mo EQ 99 hosp = 98.<br> &gt; Variable labels hosp 'outcome'.<br> &gt; Value labels hosp 3 'no event' 2'12 mo event' 1'immediate event'.<br> &gt; Freq<br> &gt; /var=hosp<br> &gt; /missing=include.<br> [ ... ]<br> </div> </div> </blockquote> </body> </html>

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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


Back to: Top of message | Previous page | Main SPSSX-L page