Select Cases in SPSS

The post is about Select Cases in SPSS (IBM SPSS-Statistics) as sometimes you may be interested in analyzing the specific part (subpart) of the available dataset. For example, you may be interested in getting descriptive or inferential statistics for males and females separately. One may also be interested in a certain age range or may want to study (say) only non-smokers. In such cases, one may use Select Cases in SPSS.

Select Cases in SPSS: Step-by-Step Procedure

For illustrative purposes, I am using the “customer_dbase” file available in SPSS sample data files. I am assuming the gender variable to select male customers only and will present some descriptive statistics only for males. For this purpose follow these steps:

Step 1: Go to the Menu bar, select “Data” and then “Select Cases”.

Select Cases in SPSS - 1

Step 2: A new window called “Select Cases” will open.

Use of If statement for Select Cases in SPSS

Step 3: Tick the box called “If the condition is satisfied” as shown in the figure below.

Select Cases in SPSS - 2

Step 4: Click on the button “If” highlighted in the above picture.

Step 5: A new window called “Select Cases: If” will open.

Select Cases in SPSS - If Dialog box 3

Step 6: The left box of this dialog box contains all the variables from the data view. Choose the variable (using the left mouse button) that you want to select cases for and use the “arrow” button to move the selected variable to the right box.

Step 7: In this example, the variable gender (for which we want to select only men) is shifted from the left to the right box. In the right box, write “gender=0” (since men have the value 0 code in this dataset).

Select Cases in SPSS - with Condition

Step 8: Click on Continue and then the OK button. Now, only men are selected (and the women’s data values are temporarily filtered out from the dataset).

Re-Select Cases in SPSS

Note: To “re-select” all cases (complete dataset), you carry out the following steps:

Step a: Go to the Menu bar, choose “Data” and then “Select Cases”.

Step b: From the dialog box of “Select Cases”, tick the box called “All cases”, and then click on the OK button. 

Select Cases in SPSS - data 5

When you use the Select Cases in SPSS, a new variable called “filter” will be created in the dataset. Deleting this filter variable, the selection will disappear. The “un-selected” cases are crossed over in the data view windows.

Select Cases in SPSS - data view 6

Note: The selection will be applied to everything you do from the point you select cases until you remove the selection. In other words, all statistics, tables, and graphs will be based only on the selected individuals until you remove (or change) the selection.

Random Sample of Cases

There is another kind of selection too. For example, the random sample of cases, based on time or case range, and use the filter variable. The selected case can be copied to a new dataset or unselected cases can be deleted. For this purpose choose the appropriate option from the output section of the select cases dialog box.

Select Cases in SPSS - random selection 7

For other SPSS tutorials Independent Sample t-tests in SPSS

Hypothesis Testing in R Programming Language

Cronbach’s Alpha Reliability Analysis of Measurement Scales

Cronbach’s Alpha Reliability Analysis

Cronbach’s Alpha Reliability analysis is used to study the properties of measurement scales (Likert scale questionnaire) and the items (questions) that make them up. The reliability analysis method computes several commonly used measures of scale reliability. The reliability analysis also provides information about the relationships between individual items in the scale. The intraclass correlation coefficients can be used to compute the interrater reliability estimates.

Consider that you want to know if my questionnaire measures customer satisfaction in a useful way. For this purpose, you can use the reliability analysis to determine the extent to which the items (questions) in your questionnaire are correlated with each other. The overall index of the reliability or internal consistency of the scale as a whole can be obtained. You can also identify problematic items that should be removed (deleted) from the scale.

As an example open the data “satisf.save” already available in SPSS sample files. To check the reliability of Likert scale items follow the steps given below:

Cronbach's Alpha Reliability
Cronbach's Alpha Reliability Analysis Dialog box

Step 1: On the Menu bar of SPSS, Click Analyze > Scale > Reliability Analysis… option

Step 2: Select two more variables that you want to test and shift them from the left pan to the right pan of the reliability analysis dialogue box. Note, that multiple variables (items) can be selected by holding down the CTRL key and clicking the variable you want. Clicking the arrow button between the left and right pan will shift the variables to the item pan (right pan).

Step 3: Click on the “Statistics” Button to select some other statistics such as descriptives (for item, scale, and scale if item deleted), summaries (for means, variances, covariances, and correlations), inter-item (for correlations and covariances) and ANOVA table (for none, F-test, Friedman chi-square and Cochran chi-square) statistics etc.

Reliability Statistics

Click on the “Continue” button to save the current statistics options for analysis. Click the OK button in the Reliability Analysis dialogue box to get the analysis to be done on selected items. The output will be shown in SPSS output windows.

Reliability Analysis Output

The Cronbach’s Alpha Reliability ($\alpha$) is about 0.827, which is good enough. Note that, deleting the item “organization satisfaction” will increase the reliability of remaining items to 0.860.

A rule of thumb for interpreting alpha for dichotomous items (questions with two possible answers only) or Likert scale items (questions with 3, 5, 7, or 9, etc items) is:

  • If Cronbach’s Alpha is $\ge 0.9$, the internal consistency of scale is Excellent.
  • If Cronbach’s Alpha is $0.90 > \alpha \ge 0.8$, the internal consistency of scale is Good.
  • If Cronbach’s Alpha is $0.80 > \alpha \ge 0.7$, the internal consistency of scale is Acceptable.
  • If Cronbach’s Alpha is $0.70 > \alpha \ge 0.6$, the internal consistency of scale is Questionable.
  • If Cronbach’s Alpha is $0.60 > \alpha \ge 0.5$, the internal consistency of scale is Poor.
  • If Cronbach’s Alpha is $0.50 > \alpha $, the internal consistency of scale is Unacceptable.

However, the rules of thumb listed above should be used with caution since Cronbach’s Alpha reliability is sensitive to the number of items in a scale. A larger number of questions can result in a larger Alpha Reliability, while a smaller number of items may result in smaller $\alpha$.

Online MCQs Test Preparation Website with Answers

Independent Samples t test in SPSS

Introduction (Independent Samples t test using SPSS)

Independent Samples t test is a test for independent groups and is useful when the same variable has been measured in two independent groups and the researcher wants to know whether the difference between group means is statistically significant. “Independent groups” means that the groups have different people in them and that the people in the different groups have not been matched or paired in any way.

Objectives of Independent Samples t test

The independent t-test compares the means of two unrelated/independent groups measured on the Interval or ratio scale. The SPSS t-test procedure allows the testing of the hypothesis when variances are assumed to be equal or when are not equal and also provides the t-value for both assumptions. This test also provides the relevant descriptive statistics for both of the groups.

Assumptions (Independent Samples t test)

  • Variable can be classified into two groups independent of each other.
  • The variable is Measured on an interval or ratio scale.
  • The measured variable is approximately normally distributed
  • Both groups have similar variances  (variances are homogeneity)

Data Required for (Independent Samples t test)

Suppose a researcher wants to discover whether left and right-handed telephone operators differed in the time it took them to answer calls. The data for reaction time were obtained (RT’s measured in seconds):

Data Telephone: Independent Samples t test

The mean reaction times suggest that the left-handers were slower but does a t-test confirm this?

Independent Samples t Test using SPSS

Perform the following steps to perform the Independent Samples t-test by using the SPSS and entering the data set in the SPSS data view

1) Click Analyze > Compare Means > Independent-Samples T Test… on the top menu as shown below.

Independent Samples t test in SPSS

2) Select continuous variables that you want to test from the list.

independent samples t test - 2

3) Click on the arrow to send the variable in the “Test Variable(s)” box. You can also double-click the variable to send it in the “Test Variable” Box.

4) Select the categorical/grouping variable so that group comparison can be made and send it to the “Grouping Variable” box.

5) Click on the “Define Groups” button. A small dialog box will appear asking about the name/code used in the variable view for the groups. We used 1 for males and 2 for females. Click the Continue button when you’re done. Then click OK when you’re ready to get the output.  See the Pictures for a Visual view.

independent samples t test - Define groups 3

Independent Samples t-test SPSS Output

independent samples t test - SPSS Output 4

The first Table in the output is about descriptive statistics concerning your variables. The number of observations, mean, variance, and standard error are available for both of the groups (male and female)

The second Table in the output is an important one concerning the testing of the hypothesis. You will see that there are two t-tests. You have to know which one to use. When comparing groups having approximately similar variances use the first t-test. Levene’s test checks for this. If the significance for Levene’s test is 0.05 or below, then it means that the “Equal Variances Not Assumed” test should be used (the second one), Otherwise use the “Equal Variances Assumed” test (first one).  Here the significance is 0.287, so we’ll be using the “Equal Variances” first row in the second table.

In the output table “t” is the calculated t-value from test statistics, for example, the t-value is 1.401

df stands for degrees of freedom, in the example, we have 18 degrees of freedom

Sig (two-tailed) means two-tailed significance value (P-Value), for example, the sig value is greater than 0.05 (significance level).

Decision

As the P-value of 0.178 is greater than our 0.05 significance level we fail to reject the null hypothesis. (two-tailed case)

As the P-value of 0.089 is greater than our 0.05 significance level we fail to reject the null hypothesis. (one tail case with 0.05 significance level)

As the P-value of 0.089 is smaller than our 0.10 significance level we reject the null hypothesis and accept the alternative hypothesis. (one tail case with 0.10 significance level). In this case, it means that the left handler has a slower reaction time as compared to the right handler on average.

Other links to study Independent Samples t-test using SPSS

  • https://libguides.library.kent.edu/SPSS/IndependentTTest
  • https://statistics.laerd.com/spss-tutorials/independent-t-test-using-spss-statistics.php

R Programming Language Frequently Asked Questions