Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filtering cases based on response completion

I'm currently attempting to clean a rather large dataset, however, I have noticed that a significant amount of participants failed to complete the survey, or did not even respond to the first question. Nevertheless, their data was included in my dataset.

Question: Is there a way to filter out participants based on response completion? For example, I'd like to filter out all cases which have failed to provide a response on at least 30% of the total questions.

like image 296
Olivier Avatar asked Jan 07 '23 13:01

Olivier


1 Answers

Yes.

First, you'll want to create a new variable that counts the number of missing observations in the data:

COUNT
countmiss = v1 v2 v3 v4 v5 v6  (MISSING).

Then, you'll want to filter out participants who miss a specified number of responses (here, I'm going to filter out people who missed two responses):

USE ALL.
COMPUTE filter_$=(countmiss >= 2).
VARIABLE LABEL filter_$ countmiss >= 2 (FILTER)'.
VALUE LABELS filter_$  0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

Note that the second step can be achieved via the Data -> Select Cases menu.

like image 89
maxwelldeux Avatar answered Jan 09 '23 03:01

maxwelldeux