Close Home Forum Sign up / Log in

HELP please: Select cases question

S

Hi, can someone please help me here, its an SPSS question

how do I do this:
I just want to run descriptives over my whole dataset but exclude data from cases 2,5 and 7?

I can't use the "if condition is satisfied", "random..", "based on time or case range" and I'm not sure how to use "filter variable".

thanks
satchi

Hi Satchi!

Have you numbered the cases in their own column - i.e. do you have a column called "caseNo" or similar? If so you should then be able to select cases. I assume you can't at the mo, because you are just using them how they are numbered in SPSS (without defining them in your own column)

S

hi sneaks! I'm so glad to see you!!!
yes I have a name for the cases; its called numbers
what do I do

satchi

ok go to Data > Select Cases > if condition satisfies

Then put across your 'number' variable to the right hand box. Then Click the symbol ~= then the number, then the & sign so...

Number ~= 2 & Number ~= 5 & Number ~= 7

Then run it - you should have excluded analysis on 2, 5 and 7.

Hope it works!

S

hi sneaks
thanks for your help :-)
SPSS just marked the others (except cases 2,5 and 7) but the values are still there.
what I have done so far is to copy the whole data set and delete cases 2, 5 and 7 and then ran descriptives.
thanks again
satchi

======= Date Modified 26 Apr 2010 11:24:04 =======
If you want to know whether you have excluded those cases from analysis then the number on the left column (the colum in grey) wil have a slash through it. The numbers/values will still be there, but SPSS just won't run analysis on them.

http://www.learnhigher.ac.uk/analysethis/images/spssgraphfour.jpg

See the slashes through the grey column on the left? - if you have excluded them then this slash will appear on the correct case and then whatever you do next e.g. t-test, regression etc. won't include these cases, not until you go back to data>select cases and open it back up to ALL cases being analysed.

S

oh! ok I will do it
HAHAHA they really should write easier easier SPSS books for people like me
thanks!!!!!!!!!
satchi

Great! Just make sure that if you want to go back and use these cases in the analysis, to undo what you've done (i.e. unexclude them) by going back to data > select cases. (up)(up)(up)

S

hi sneaks
oh I think I just selected the cases I didn't want!
so I just have to repeat the same steps with the cases excluding 2, 5 and 7!
thanks a lot
satchi

make sure you are using the ~= sign NOT the = sign. You are telling SPSS "I want to do analysis on everything that doesn't equal ??"

So

Number ~= 2 & Number ~= 5 & Number ~= 7

S

AH!!! that fixes it!!!!
thanks a lot Sneaks
:-) :-) :-)
satchi

14671