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. 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. <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 99 for H_12mo before the
<br>
computation (using MISSING VALUES h_12mo ( ) ); and re-instate<br>
it at the end. 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. Thus -- make the initializing of Hosp<br>
set it to 98; and change the test at the end to <br>
<br>
IF SYSMIS(H_12mo) hosp= 8.<br>
<br>
- 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>> Date: Thu, 3 Nov 2011 12:26:12 -0400<br>
> From: <a class="moz-txt-link-abbreviated" href="mailto:mc006@PACBELL.NET">mc006@PACBELL.NET</a><br>
> Subject: Compute command and System User missing<br>
> To: <a class="moz-txt-link-abbreviated" href="mailto:SPSSX-L@LISTSERV.UGA.EDU">SPSSX-L@LISTSERV.UGA.EDU</a><br>
> <br>
> Hi,<br>
> I'm a doctoral student (epidemiology)and have not used
SPSS in awhile. I'm<br>
> trying to do something quite simple but am running into a
problem with<br>
> system missing and user missing values.<br>
> Old variables are H_now (no missing values) and H_12mo
which has 3 system<br>
> missing and 7 user missing (99).<br>
> I want to create a new variable (hosp). I set the new
variable to 8 so that<br>
> any cases that "fall thru" will be evident to me. Indeed,
10 cases fall thru<br>
> and are listed as an "8". These are the 3 sysmis and the
7 user missing (99).<br>
> compute hosp=8.<br>
> if H_now EQ 1 hosp = 1.<br>
> if (H_now EQ 0 and H_12mo EQ 1) hosp = 2.<br>
> if (H_now EQ 0 and H_12mo EQ 0) hosp = 3.<br>
> If H_12mo EQ 99 hosp = 98.<br>
> Variable labels hosp 'outcome'.<br>
> Value labels hosp 3 'no event' 2'12 mo event' 1'immediate
event'.<br>
> Freq<br>
> /var=hosp<br>
> /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
|