spssforum.com from users, for users

SPSSforum.com is the largest free SPSS help resource worldwide.
On this SPSS forum you are sure to get an answer to your question!
Join the forum and let other SPSS users help you.

Join the SPSS users Group on LinkedIn
Join the SPSS Users Group
on LinkedIn
 
SPSSforum.com is a forum for SPSS users. Ask any question you like about SPSS or statistics.

It is currently Fri Sep 03, 2010 3:42 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: defining missing values IF
PostPosted: Thu Mar 05, 2009 8:58 am 
Offline

Joined: Thu Mar 05, 2009 8:34 am
Posts: 2
hello,
I have a small problem with defining some missing values and hope somebody can help me...

I want to recode the values of several variables (B,C,D) into "missing" (=99) IF a specific other variable (A) is coded as missing.
I already tried to filter A as missing and then recode B,C and D but somehow it didn't filter but recoded all values of B,C,D into missing no matter if A was coded as missing or not.
then I tried "DO IF A=99. RECODE B (0=99) (1=99). RECODE C (0=99) (1=99). RECODE D (0=99) (1=99). END IF."
nothing happened :(

I hope the problem is clear and am curious what your solutions are.
Lale.


Top
 Profile  
 



 Post subject: Re: defining missing values IF
PostPosted: Thu Mar 05, 2009 2:09 pm 
Offline
Moderator

Joined: Sun Dec 28, 2008 5:55 pm
Posts: 555
Location: Belo Horizonte, Brasil
If 99 is defined as missing value, then nothing will happen. Should happen when using $SYSMIS, but still doesn't work for that. You should go back to the variable view and sleect NONE as missing value for your A variable. Then it will work. After thatm redefine the missing values.

_________________
BR

NOTE: "Please read the Posting Guidelines and always tell us your OS, the SPSS version and some information about your data!" - by statman.

Disponível em português (mas prefira inglês para que outros também entendam a solução).


Top
 Profile  
 
 Post subject: Re: defining missing values IF
PostPosted: Thu Mar 05, 2009 5:57 pm 
Offline

Joined: Wed Nov 26, 2008 7:12 pm
Posts: 54
Location: Kansas City, MO
There could also be a syntax problem, although if I am underthinking this forgive me. You can't write DO IF and RECODE commands on one line, even if separated with periods. They need to be on separate lines.


Top
 Profile  
 
 Post subject: Re: defining missing values IF
PostPosted: Fri Mar 06, 2009 9:46 am 
Offline

Joined: Thu Mar 05, 2009 8:34 am
Posts: 2
@ fierce: it worked! thanks a lot; I got it.
@ pvalue: thanks, but yes..I only quoted it in one line because of space-reasons.


Top
 Profile  
 



Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL

This site is in no way connected with SPSS Inc. or any affiliate of SPPS Inc. The SPSS logo and products are owned by and copyrighted by SPSS Inc. The views expressed in the messages posted on this site are those of persons writing those comments and not necessarily those of the SPSSforum.com. SPSSforum.com does not vouch for the accuracy or truthfulness of any posted statement or opinion. The SPSSforum.com has, however, refrained from posting any item containing any statement known to be inaccurate, false or baseless.