How can I Select If 3 Missing Data

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I Select If 3 Missing Data

Evan Harrington, Ph.D.

I have a large dataset based on an extensive questionnaire, with numerous survey items that are arranged in subscales. As part of the coding structure of this survey, participants are permitted to have 2 missing values on a subscale, but if they have 3 or more missing values they are not usable.


Because I have over a thousand participants, with dozens of subscales per case, I'm trying to figure out a way to use the "Select If" function to identify those who have 3 or more Sysmis values across the 10 items on a subscale. I've tried a few things, but so far nothing is able to accommodate the structure I have.


Thoughts?



Evan Harrington, Ph.D.
Department of School Psychology
The Chicago School of Professional Psychology
325 N. Wells Street
Chicago, IL 60654
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How can I Select If 3 Missing Data

Jeff A

 

…several ways to do that. Here’s one.

 

Compute checkvariable = 0

Do repeat x = subscalevar1 to subscalevar10

  Do if (sysmis(x)).

     checkvariable = checkvariable + 1.

  End if.

End repeat.

Select if (checkvariable < 3).

 

I think that will work, but can’t test right now. There’s likely an easier way using the sum.x function assuming that the subscale is a simple addition.

 

Best,

 

Jeff

 

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Evan Harrington
Sent: Monday, January 13, 2020 5:26 PM
To: [hidden email]
Subject: How can I Select If 3 Missing Data

 

I have a large dataset based on an extensive questionnaire, with numerous survey items that are arranged in subscales. As part of the coding structure of this survey, participants are permitted to have 2 missing values on a subscale, but if they have 3 or more missing values they are not usable.

 

Because I have over a thousand participants, with dozens of subscales per case, I'm trying to figure out a way to use the "Select If" function to identify those who have 3 or more Sysmis values across the 10 items on a subscale. I've tried a few things, but so far nothing is able to accommodate the structure I have.

 

Thoughts?

 

 

Evan Harrington, Ph.D.

Department of School Psychology

The Chicago School of Professional Psychology

325 N. Wells Street

Chicago, IL 60654

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How can I Select If 3 Missing Data

John F Hall

How are your responses coded for the actual questions?

 

You could also do:

 

count xmiss = subscalevar1 to subscalevar10 (sysmis).

var lab xmiss 'Missing on 3 or more".

format xmiss (f2.0).

temp.

*otherwise you permanently lose all the xmiss cases.

Select if xmiss ge 3.

 

You can restore the full data set with:

use all.

 

Not a good idea to use sysmis as a missing value: you should supply user-missing values:

Assuming your checklists have only positive integer values for valid responses, recode missing values to an equivalent negative value eg:

 

recode item 1(9=-9)(8=--8) then:

missing values <list1><list2><listn> (lo thru -1).

*<list> means use original scale items eg: q1a to q1b, q2a to q2b.

 

John F Hall

[Retired academic survey researcher]

IBM-SPSS Academic Author 9900074

 

Email:             [hidden email]

Website:          http://surveyresearch.weebly.com/

SPSS course:   http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html

Research:        http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-life.html

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jeff A
Sent: 13 January 2020 09:56
To: [hidden email]
Subject: Re: How can I Select If 3 Missing Data

 

 

…several ways to do that. Here’s one.

 

Compute checkvariable = 0

Do repeat x = subscalevar1 to subscalevar10

  Do if (sysmis(x)).

     checkvariable = checkvariable + 1.

  End if.

End repeat.

Select if (checkvariable < 3).

 

I think that will work, but can’t test right now. There’s likely an easier way using the sum.x function assuming that the subscale is a simple addition.

 

Best,

 

Jeff

 

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Evan Harrington
Sent: Monday, January 13, 2020 5:26 PM
To: [hidden email]
Subject: How can I Select If 3 Missing Data

 

I have a large dataset based on an extensive questionnaire, with numerous survey items that are arranged in subscales. As part of the coding structure of this survey, participants are permitted to have 2 missing values on a subscale, but if they have 3 or more missing values they are not usable.

 

Because I have over a thousand participants, with dozens of subscales per case, I'm trying to figure out a way to use the "Select If" function to identify those who have 3 or more Sysmis values across the 10 items on a subscale. I've tried a few things, but so far nothing is able to accommodate the structure I have.

 

Thoughts?

 

 

Evan Harrington, Ph.D.

Department of School Psychology

The Chicago School of Professional Psychology

325 N. Wells Street

Chicago, IL 60654

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How can I Select If 3 Missing Data

Rich Ulrich
In reply to this post by Evan Harrington, Ph.D.
The purpose of having subscales is to create the subscale scores
(and, after that, mostly ignore the separate items).  The mean.x( )
and sum.x( ) functions say that "x" values have to be valid or the
score will be set to missing.  Compute your subscales. For the simple
additive case (reversing reverse-scaled item-scores beforehand, if
required), you have something like.

COMPUTE  subsc1= mean.8(var1 to var10).

(If someone insists on having "sum", you have to consider whether
the raw sum, from sum.8( )  is better than the adjusted-for-missing
value of 10*mean.8( ).  )

Then do your selections based on Missing for the subscales.

--
Rich Ulrich

From: SPSSX(r) Discussion <[hidden email]> on behalf of Evan Harrington <[hidden email]>
Sent: Monday, January 13, 2020 2:26 AM
To: [hidden email] <[hidden email]>
Subject: How can I Select If 3 Missing Data
 

I have a large dataset based on an extensive questionnaire, with numerous survey items that are arranged in subscales. As part of the coding structure of this survey, participants are permitted to have 2 missing values on a subscale, but if they have 3 or more missing values they are not usable.


Because I have over a thousand participants, with dozens of subscales per case, I'm trying to figure out a way to use the "Select If" function to identify those who have 3 or more Sysmis values across the 10 items on a subscale. I've tried a few things, but so far nothing is able to accommodate the structure I have.


Thoughts?



Evan Harrington, Ph.D.
Department of School Psychology
The Chicago School of Professional Psychology
325 N. Wells Street
Chicago, IL 60654
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How can I Select If 3 Missing Data

David Marso-2
In reply to this post by Evan Harrington, Ph.D.
See NMISS function.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How can I Select If 3 Missing Data

John F Hall
In reply to this post by John F Hall

OK, here's something you can try using your initial item values and assuming you have five checklists, each with 10 items coded 1 to 4, and that your target variables are to be called checklist1 to checklist5 and that checklist items are called checklist1_1 to checklist1_10,  checklist2_1 to checklist2_10 etc, etc.

 

For example, if the first checklist score checklist1score source variables are checklist1_1 to checklist1_10:

 

*To check your existing data file.

DISPLAY DICTIONARY

checklist1_1 to checklist1_10.

DISPLAY LABELS

checklist1_1 to checklist1_10.

 

*To check for missing data.

COUNT checklist1_miss = checklist1_1 to checklist1_10 (sysmis).

FREQUENCIES checklist1_miss.

 

*To analyse the first checklist.

VALUE LABELS checklist1_1 to checklist1_10

1 'Never' 2 'Sometimes' 3 'Often' 4 'Always'.

COMPUTE checklist1score = sum.7(checklist1_1 to checklist1_10).

FORMATS checklist1score (f2.0).

VARIABLE LABELS

checklist1score 'Score on checklist1'.

VALUE LABELS

checklist1score 1 'Low' 10 'High'.

FREQUENCIES

checklist1score.

 

When,calculating scores I usually subtract the number of items in the scale in order to create a ratio scale with a true zero point, otherwise comparison of statistics such as means can be misleading and consequently misinterpreted.

 

You might also check out  NMISS in the manual (p.99) eg:

 

COUNT checklist1_nmiss = nmiss (checklist1_1 to checklist1_10).

FREQUENCIES checklist1_nmiss.

 

You will have to repeat the above for all the scales, but it should be possible with DO REPEAT.

 

 

From: Evan Harrington <[hidden email]>
Sent: 14 January 2020 21:12
To: John F Hall <[hidden email]>
Subject: Re: How can I Select If 3 Missing Data

 

I've actually been on the SPSS listserv for over 10 years (though I took a hiatus from it for some time), so I've seen your numerous helpful responses to many people over the years.

 

I can send a sample data file, though I need to do a few more hours of cleaning first, to recode values according to the test manual. We have a commercial personality inventory, which we have the license to use, but we chose to analyze the results ourselves rather than have the test company give us the restricted type of results that they normally do. The numerical values represent "never", "sometimes", "often", and "always". Missing data points get scored as "sometimes", but if there are three or more missing values on a subscale then the subscale cannot be used.

 

I've never had to transform data in this manner before, so I'm keen to see how this is done. Once I complete the cleaning and recoding process I'll send you a sample of the data.

 

Thanks for your help!

 

Evan Harrington, Ph.D.

Department of School Psychology

The Chicago School of Professional Psychology

325 N. Wells Street

Chicago, IL 60654

 


From: John F Hall <[hidden email]>
Sent: Tuesday, January 14, 2020 3:46 AM
To: Evan Harrington <[hidden email]>
Subject: RE: How can I Select If 3 Missing Data

 

Dear Dr Harrington

 

What do the values 1 to 4 represent?  Are these values derived from sets of items in batteries: Agree – Disagree, Yes-No, or something like that? 

 

Can you send me a sample extract from your questionnaire or checklist?  If you send me an extract of your SPSS *.sav file (say 100 cases) in complete confidence as I subscribe to various professional Codes of Conduct.  I can probably help you with the syntax, which is far easier to understand and use than the drop-down menus in the GUI.

 

Meanwhile have a look at some of the SPSS tutorials on my site, especially 1.3.3.2 Introduction to SPSS syntax.

Also check out 2.3.1.1  Data transformations on page 2.3 Data transformations,

 

Tracked your profile in Chicago, so I now know who you are and what you do.

 

Sincerely

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: Evan Harrington <[hidden email]>
Sent: 13 January 2020 19:47
To: John F Hall <[hidden email]>
Subject: Re: How can I Select If 3 Missing Data

 

The valid responses are "1" to "4". The scoring of the scale is such that all non-responses get rescored as "1", unless the subscale has 3 or more missing values, in which case they do not get scored for *that* subscale at all.

 

I'm not very experienced at tweaking the coding in the "paste" menu, hence my difficulty on this problem.

 

Evan Harrington, Ph.D.

Department of School Psychology

The Chicago School of Professional Psychology

325 N. Wells Street

Chicago, IL 60654

 


From: SPSSX(r) Discussion <[hidden email]> on behalf of John F Hall <[hidden email]>
Sent: Monday, January 13, 2020 11:22 AM
To: [hidden email] <[hidden email]>
Subject: Re: How can I Select If 3 Missing Data

 

How are your responses coded for the actual questions?

 

You could also do:

 

count xmiss = subscalevar1 to subscalevar10 (sysmis).

var lab xmiss 'Missing on 3 or more".

format xmiss (f2.0).

temp.

*otherwise you permanently lose all the xmiss cases.

Select if xmiss ge 3.

 

You can restore the full data set with:

use all.

 

Not a good idea to use sysmis as a missing value: you should supply user-missing values:

Assuming your checklists have only positive integer values for valid responses, recode missing values to an equivalent negative value eg:

 

recode item 1(9=-9)(8=--8) then:

missing values <list1><list2><listn> (lo thru -1).

*<list> means use original scale items eg: q1a to q1b, q2a to q2b.

 

John F Hall

[Retired academic survey researcher]

IBM-SPSS Academic Author 9900074

 

Email:             [hidden email]

Website:          http://surveyresearch.weebly.com/

SPSS course:   http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html

Research:        http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-life.html

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jeff A
Sent: 13 January 2020 09:56
To: [hidden email]
Subject: Re: How can I Select If 3 Missing Data

 

 

…several ways to do that. Here’s one.

 

Compute checkvariable = 0

Do repeat x = subscalevar1 to subscalevar10

  Do if (sysmis(x)).

     checkvariable = checkvariable + 1.

  End if.

End repeat.

Select if (checkvariable < 3).

 

I think that will work, but can’t test right now. There’s likely an easier way using the sum.x function assuming that the subscale is a simple addition.

 

Best,

 

Jeff

 

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Evan Harrington
Sent: Monday, January 13, 2020 5:26 PM
To: [hidden email]
Subject: How can I Select If 3 Missing Data

 

I have a large dataset based on an extensive questionnaire, with numerous survey items that are arranged in subscales. As part of the coding structure of this survey, participants are permitted to have 2 missing values on a subscale, but if they have 3 or more missing values they are not usable.

 

Because I have over a thousand participants, with dozens of subscales per case, I'm trying to figure out a way to use the "Select If" function to identify those who have 3 or more Sysmis values across the 10 items on a subscale. I've tried a few things, but so far nothing is able to accommodate the structure I have.

 

Thoughts?

 

 

Evan Harrington, Ph.D.

Department of School Psychology

The Chicago School of Professional Psychology

325 N. Wells Street

Chicago, IL 60654

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD