computing z-scores for one or many variables.Some examples that we'll demonstrate below are However,Īn active filter does affect functions over cases. We therefore need DO IF or IF to restrict this transformation to a selection of cases. For example, over variables -as shown below- affects all cases, regardless of whatever filter is active.
Most data editing in SPSS is unaffected by filtering. In any case, I think these built-in filters can be very handy and it kinda puzzles me they're only limited to the 4 aforementioned commands. I suspect you can enter more complex conditions on the resulting /SELECT subcommand as well. The dialog suggests you can filter cases -for this command only- based on just 1 variable. Something else you may want to know is that some commands have a built-in filter. *Crosstabs includes only males in IT and rolls back case selection. *Delete cases unless gender = 1 & jtype = 3. *Make following transformation(s) temporary. The second CROSSTABS therefore includes all cases again. The example below shows just that: the first CROSSTABS is limited to a selection of cases but also rolls back our case deletion. SELECT IF permanently deletes cases from your data.īy combining them you can circumvent the need for creating a filter variable but for 1 analysis at the time only.TEMPORARY can “undo” some data editing that follow it and.Example 3 - Filter without Filter Variable Let's deactivate our new filter variable as well withįILTER OFF. Only 1 filter variable can be active at any time. We now have 2 filter variables in our data Rerunning our contingency table (not shown) confirms that SPSS now reports only 181 female cases working in marketing or sales. variable labels filt_2 'Filter in females working in sales and marketing'. *Set filter to 1 for females in job types 1 and 2. *Create filter variable holding only zeroes. A good starting point is running a very simple contingency table as shown below. Example 2 - Filter on 2 Variablesįor some other analysis, we'd like to use only female respondents working in sales or marketing. We'll leave our filter variable filt_1 in the data. The status bar confirms that a filter variable is in effect.įinally, let's deactivate our filter by simply running The strikethrough its $casenum shows that case 21 is currently filtered out. We can see why in data view as shown below.Ĭase 21 has 8 missing values on q1 to q9 and we recoded this into zero on our filter variable. The 8 cases with 3 or more missing values are still in our data but they are excluded from all analyses. Note that SPSS now reports 456 instead of 464 cases. *Reinspect numbers of missings over q1 to q9. variable labels filt_1 'Filter out cases with 3 or more missings on q1 to q9'. recode mis_1 (lo thru 2 = 1)(else = 0) into filt_1.
We'll first just count them by running the syntax below. In any case, we may want to exclude cases having many missing values on these variables. Perhaps we'd like to run a factor analysis on them or use them as predictors in regression analysis.
Let's put things into practice.Įxample 1 - Exclude Cases with Many Missing ValuesĪt the end of our data, we find 9 rating scales: q1 to q9. Only use filter variables containing 0 or 1 for each case.Įnough theory. On the filter variable are excluded from all analyses until you deactivate the filter. In theory, any variable can be used as a filter variable.
#Instalar spss 20 download
Feel free to download these data and rerun the examples yourself. This file contains the data from a small bank employee survey. I'll use bank_clean.sav -partly shown below- for all examples in this tutorial. Example 3 - Filter without Filter Variable.Example 1 - Exclude Cases with Many Missing Values.SPSS FILTER temporarily excludes a selection of casesįor excluding cases from data editing, use DO IF or IF instead. SPSS FILTER – Quick & Simple Tutorial report this ad By Ruben Geert van den Berg under SPSS A-Z