Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

SPSS Statistics - The ANY function.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
UNIT 4.pptx
UNIT 4.pptx
Chargement dans…3
×

Consultez-les par la suite

1 sur 8 Publicité

Plus De Contenu Connexe

Similaire à SPSS Statistics - The ANY function.pptx (20)

Publicité

Plus récents (20)

SPSS Statistics - The ANY function.pptx

  1. 1. Copyright ©2022 Version 1. All rights reserved. 1 Tech Tips – The ANY Function Version 1 SPSS Team February 2023 Externally available Company Classification: Date: Presented By:
  2. 2. Copyright ©2022 Version 1. All rights reserved. 2 • The any function is a very useful logical function: • ANY(test, value1, value2, …) • Returns a value of 1 if the test is true and 0 otherwise. • E.g. ANY(var1, 1, 3, 5) • Will return a value of 1 if var1 has a value of 1, 3 or 5. Otherwise it will return a value of 0. • Use ANY instead of using a series of or statements • ANY(Var1, 1, 3, 5) = (var1 = 1 or var1 = 3 or var1=5) Tech Tips – The ANY Function
  3. 3. Copyright ©2022 Version 1. All rights reserved. 3 Tech Tips – The ANY Function • The ANY function can also be used to scan a list of variables of expressions for a value. • For example, ANY (1, var1, var2, var3) returns a value of 1 if any of the specified variables have a value of 1, otherwise it will return a value of 0. • We will use a sample data file called cable_survey.sav. • The file is located in the installation directory for SPSS, in a folder called ‘Samples’. • We will use the ANY function in the select cases procedure to create a new dataset with categories of 1, 3, and 4 of the variable hometype.
  4. 4. Copyright ©2022 Version 1. All rights reserved. 4 Tech Tips – The ANY Function • Go to the Data menu and chose Select Cases • Select the If condition is satisfied button
  5. 5. Copyright ©2022 Version 1. All rights reserved. 5 Tech Tips – The ANY Function • Select All functions • Select ANY and move this into the main box • Create the expression ANY(hometype,1,3,4) • Click Continue and select to move cases to another dataset.
  6. 6. Copyright ©2022 Version 1. All rights reserved. 6 Tech Tips – The ANY Function • Now you can check the results in your new data file.
  7. 7. Copyright ©2022 Version 1. All rights reserved. 7 SPSS Tech Tips Contact us SPSSAdmin@version1.com + 44 (0) 203 859 4790 + 353 (0) 1 865 7800 www.spssanalyticspartner.com For more Tech Tips, go to the Tech Tips section within the Learning Hub.
  8. 8. Copyright ©2022 Version 1. All rights reserved. 8 Thank you.

×