Hi
I am new to SPSS syntax and was wondering if anyone could help me with the following. I have two different questionnaires Depression (eg. T0_Depress_1, T0_Depress_2,T0_Depress_3, etc.) and Anxiety (e.g, T0_Anx_1, T0_Anx_2, T0_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items are scored on a Liket Scale 1-5. I would like to create a new variable that allows me to find out how many people completed and how many people did not complete each of the questionnaires at each of the two time-points. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
We need more information. Do your respondents have a unique id variable? Are the responses to both questionnaires in the same data set? Assuming variables at time 1 are T0_Depress_1 to T0_Depress_n T0_Anx_1, to T0_Anx_n . . and at time 2: T1_Depress_1 to T1_Depress_n T1_Anx_1, to T1_Anx_n Something like (untested and in haste): DO REPEAT x = T0_Depress_1 to T0_Depress_n /y = T1_Depress_1 to T1_Depress_n Count depress0 = x (1 thru 5) /depress1 = y (1 thru 5). END REPEAT. RECODE depress0 depress1 ( 2 thru 5 =1). COMPUTE nodepress = depress0 * 10 + depress1. FREQUENCIES nodepress. *test to identify cases. LIST id nodepress depress0 depress1 /cases 20. *if it works. LIST id nodepress depress0 depress1. DO REPEAT x = T0_Anx_1 to T0_Anx_n /y = T1_Anx_1 to T1_Anx_n Count anx0 = x (1 thru 5) /anx1 = y (1 thru 5). END REPEAT. RECODE anx0 anx1 ( 2 thru 5 =1). COMPUTE noanx = anx0 * 10 + anx1. FREQUENCIES noanx. *test to identify cases. LIST id noanx anx0 anx1 /cases 20. *if it works. LIST id noanx anx0 anx1. 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 -----Original Message----- Hi I am new to SPSS syntax and was wondering if anyone could help me with the following. I have two different questionnaires Depression (eg. T1_Depress_1, T1_Depress_2,T1_Depress_3, etc.) and Anxiety (e.g, T1_Anx_1, T1_Anx_2, T1_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items are scored on a Liket Scale 1-5. I would like to create a new variable that allows me to find out how many people completed and how many people did not complete each of the questionnaires at each of the two time-points. -- Sent from: http://spssx-discussion.1145642.n5.nabble.com/ ===================== 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 |
In reply to this post by Salina
I should have explained that nodepress and noanx will be two digit variables coded 10, 11 , 20, 21 The ones who didn't complete the second questionnaire will be coded 10 (depression) and 20 (anxiety). Codes 11 and 21 have completed both. You can get the combinations with: CROSSTABS nodepress by noanx. 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: John F Hall <[hidden email]> We need more information. Do your respondents have a unique id variable? Are the responses to both questionnaires in the same data set? Assuming variables at time 1 are T0_Depress_1 to T0_Depress_n T0_Anx_1, to T0_Anx_n . . and at time 2: T1_Depress_1 to T1_Depress_n T1_Anx_1, to T1_Anx_n Something like (untested and in haste): DO REPEAT x = T0_Depress_1 to T0_Depress_n /y = T1_Depress_1 to T1_Depress_n Count depress0 = x (1 thru 5) /depress1 = y (1 thru 5). END REPEAT. RECODE depress0 depress1 ( 2 thru 5 =1). COMPUTE nodepress = depress0 * 10 + depress1. FREQUENCIES nodepress. *test to identify cases. LIST id nodepress depress0 depress1 /cases 20. *if it works. LIST id nodepress depress0 depress1. DO REPEAT x = T0_Anx_1 to T0_Anx_n /y = T1_Anx_1 to T1_Anx_n Count anx0 = x (1 thru 5) /anx1 = y (1 thru 5). END REPEAT. RECODE anx0 anx1 ( 2 thru 5 =1). COMPUTE noanx = anx0 * 10 + anx1. FREQUENCIES noanx. *test to identify cases. LIST id noanx anx0 anx1 /cases 20. *if it works. LIST id noanx anx0 anx1. 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 -----Original Message----- Hi I am new to SPSS syntax and was wondering if anyone could help me with the following. I have two different questionnaires Depression (eg. T1_Depress_1, T1_Depress_2,T1_Depress_3, etc.) and Anxiety (e.g, T1_Anx_1, T1_Anx_2, T1_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items are scored on a Liket Scale 1-5. I would like to create a new variable that allows me to find out how many people completed and how many people did not complete each of the questionnaires at each of the two time-points. -- Sent from: http://spssx-discussion.1145642.n5.nabble.com/ ===================== 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 |
Administrator
|
In reply to this post by John F Hall
John, I don't understand why you're using DO-REPEAT for this. Wouldn't
something like the following do the trick more simply? * Untested. * Flag records with NO missing items for each questionnaire. * Change n to the number of the final item for each questionnaire. COMPUTE a0comp = NMISS(T0_Anx_1 to T0_Anx_n) EQ 0. COMPUTE d0comp = NMISS(T0_Depress_1 to T0_Depress_n) EQ 0. COMPUTE a1comp = NMISS(T1_Anx_1 to T1_Anx_n) EQ 0. COMPUTE d1comp = NMISS(T1_Depress_1 to T1_Depress_n) EQ 0. FORMAT a0comp to d1comp (F1). FREQUENCIES a0comp to d1comp. HTH. John F Hall wrote > We need more information. Do your respondents have a unique id variable? > Are the responses to both questionnaires in the same data set? > > > > Assuming variables at time 1 are > > T0_Depress_1 to T0_Depress_n > > T0_Anx_1, to T0_Anx_n > > . . and at time 2: > > T1_Depress_1 to T1_Depress_n > > T1_Anx_1, to T1_Anx_n > > > > Something like (untested and in haste): > > > > DO REPEAT > > x = T0_Depress_1 to T0_Depress_n > > /y = T1_Depress_1 to T1_Depress_n > > Count depress0 = x (1 thru 5) > > /depress1 = y (1 thru 5). > > END REPEAT. > > RECODE depress0 depress1 ( 2 thru 5 =1). > > COMPUTE nodepress = depress0 * 10 + depress1. > > FREQUENCIES nodepress. > > *test to identify cases. > > LIST id nodepress depress0 depress1 /cases 20. > > *if it works. > > LIST id nodepress depress0 depress1. > > > > DO REPEAT > > x = T0_Anx_1 to T0_Anx_n > > /y = T1_Anx_1 to T1_Anx_n > > Count anx0 = x (1 thru 5) > > /anx1 = y (1 thru 5). > > END REPEAT. > > RECODE anx0 anx1 ( 2 thru 5 =1). > > COMPUTE noanx = anx0 * 10 + anx1. > > FREQUENCIES noanx. > > *test to identify cases. > > LIST id noanx anx0 anx1 /cases 20. > > *if it works. > > LIST id noanx anx0 anx1. > > > > John F Hall > > [Retired academic survey researcher] > > IBM-SPSS Academic Author 9900074 > > > > Email: > johnfhall@ > <mailto: > johnfhall@ > > > > 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-l > ife.html > > > > -----Original Message----- > From: SPSSX(r) Discussion < > SPSSX-L@.UGA > > On Behalf Of Salina > Sent: 11 September 2118 13:36 > To: > SPSSX-L@.UGA > Subject: SPSS syntax - calculating survey attrition at different time > points > > > > Hi > > > > > > I am new to SPSS syntax and was wondering if anyone could help me with the > following. I have two different questionnaires Depression (eg. > T1_Depress_1, > T1_Depress_2,T1_Depress_3, etc.) and Anxiety (e.g, T1_Anx_1, T1_Anx_2, > T1_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items > are scored on a Liket Scale 1-5. I would like to create a new variable > that > allows me to find out how many people completed and how many people did > not > complete each of the questionnaires at each of the two time-points. > > > > > > > > -- > > Sent from: <http://spssx-discussion.1045642.n5.nabble.com/> > http://spssx-discussion.1145642.n5.nabble.com/ > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > <mailto: > LISTSERV@.UGA > > > LISTSERV@.UGA > (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 > LISTSERV@.UGA > (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 ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Since I would want to know the number of /useful/ forms, I would compute the four totals (which are usually wanted, eventually) using
COMPUTE totvar= mean.k(var_1 to var_n). - using "k" to take into account the number of acceptably-missing answers.
Depending on file organization, that shows number PRESENT, but might miss the number MISSING (unless you know that all of a particular thing is present.)
In practice, I always did FREQ on all items, to see that the form was scored as I expected,
and with no out-of-range responses. Usual layout: multiple records per form, separate files per form. Pre- and Post- could be checked at once, and scored by the same code.
Then I scored up my scales and subscales; joined periods within a form; joined forms across files. Counting from there is pretty easy. I might do scattergrams of Pre-Post and two forms at a period, to get incidental counts of what is missing.
-- Rich Ulrich From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Sunday, September 2, 2018 3:23:34 PM To: [hidden email] Subject: Re: SPSS syntax - calculating survey attrition at different time points John, I don't understand why you're using DO-REPEAT for this. Wouldn't
something like the following do the trick more simply? * Untested. * Flag records with NO missing items for each questionnaire. * Change n to the number of the final item for each questionnaire. COMPUTE a0comp = NMISS(T0_Anx_1 to T0_Anx_n) EQ 0. COMPUTE d0comp = NMISS(T0_Depress_1 to T0_Depress_n) EQ 0. COMPUTE a1comp = NMISS(T1_Anx_1 to T1_Anx_n) EQ 0. COMPUTE d1comp = NMISS(T1_Depress_1 to T1_Depress_n) EQ 0. FORMAT a0comp to d1comp (F1). FREQUENCIES a0comp to d1comp. HTH. John F Hall wrote > We need more information. Do your respondents have a unique id variable? > Are the responses to both questionnaires in the same data set? > > > > Assuming variables at time 1 are > > T0_Depress_1 to T0_Depress_n > > T0_Anx_1, to T0_Anx_n > > . . and at time 2: > > T1_Depress_1 to T1_Depress_n > > T1_Anx_1, to T1_Anx_n > > > > Something like (untested and in haste): > > > > DO REPEAT > > x = T0_Depress_1 to T0_Depress_n > > /y = T1_Depress_1 to T1_Depress_n > > Count depress0 = x (1 thru 5) > > /depress1 = y (1 thru 5). > > END REPEAT. > > RECODE depress0 depress1 ( 2 thru 5 =1). > > COMPUTE nodepress = depress0 * 10 + depress1. > > FREQUENCIES nodepress. > > *test to identify cases. > > LIST id nodepress depress0 depress1 /cases 20. > > *if it works. > > LIST id nodepress depress0 depress1. > > > > DO REPEAT > > x = T0_Anx_1 to T0_Anx_n > > /y = T1_Anx_1 to T1_Anx_n > > Count anx0 = x (1 thru 5) > > /anx1 = y (1 thru 5). > > END REPEAT. > > RECODE anx0 anx1 ( 2 thru 5 =1). > > COMPUTE noanx = anx0 * 10 + anx1. > > FREQUENCIES noanx. > > *test to identify cases. > > LIST id noanx anx0 anx1 /cases 20. > > *if it works. > > LIST id noanx anx0 anx1. > > > > John F Hall > > [Retired academic survey researcher] > > IBM-SPSS Academic Author 9900074 > > > > Email: > johnfhall@ > <mailto: > johnfhall@ > > > > 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-l > ife.html > > > > -----Original Message----- > From: SPSSX(r) Discussion < > SPSSX-L@.UGA > > On Behalf Of Salina > Sent: 11 September 2118 13:36 > To: > SPSSX-L@.UGA > Subject: SPSS syntax - calculating survey attrition at different time > points > > > > Hi > > > > > > I am new to SPSS syntax and was wondering if anyone could help me with the > following. I have two different questionnaires Depression (eg. > T1_Depress_1, > T1_Depress_2,T1_Depress_3, etc.) and Anxiety (e.g, T1_Anx_1, T1_Anx_2, > T1_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items > are scored on a Liket Scale 1-5. I would like to create a new variable > that > allows me to find out how many people completed and how many people did > not > complete each of the questionnaires at each of the two time-points. > > > > > > > > -- > > Sent from: <http://spssx-discussion.1045642.n5.nabble.com/> > http://spssx-discussion.1145642.n5.nabble.com/ > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > <mailto: > LISTSERV@.UGA > > > LISTSERV@.UGA > (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 > LISTSERV@.UGA > (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 ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Bruce, Rich, Nice answers, but it was a Sunday when most listers are not at work. I just did whatever was quickest for me with perhaps a bit of overkill to make sure Salina would get everything she wanted/needed. If I'd had a copy of the Data Editor, I could have sorted something out for her. She hasn't responded yet. 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) From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Rich Ulrich Since I would want to know the number of /useful/ forms, I would compute the four totals (which are usually wanted, eventually) using COMPUTE totvar= mean.k(var_1 to var_n). - using "k" to take into account the number of acceptably-missing answers. Depending on file organization, that shows number PRESENT, but might miss the number MISSING (unless you know that all of a particular thing is present.) In practice, I always did FREQ on all items, to see that the form was scored as I expected, and with no out-of-range responses. Usual layout: multiple records per form, separate files per form. Pre- and Post- could be checked at once, and scored by the same code. Then I scored up my scales and subscales; joined periods within a form; joined forms across files. Counting from there is pretty easy. I might do scattergrams of Pre-Post and two forms at a period, to get incidental counts of what is missing. -- Rich Ulrich From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]> John, I don't understand why you're using DO-REPEAT for this. Wouldn't > We need more information. Do your respondents have a unique id variable? > Are the responses to both questionnaires in the same data set? > > > > Assuming variables at time 1 are > > T0_Depress_1 to T0_Depress_n > > T0_Anx_1, to T0_Anx_n > > . . and at time 2: > > T1_Depress_1 to T1_Depress_n > > T1_Anx_1, to T1_Anx_n > > > > Something like (untested and in haste): > > > > DO REPEAT > > x = T0_Depress_1 to T0_Depress_n > > /y = T1_Depress_1 to T1_Depress_n > > Count depress0 = x (1 thru 5) > > /depress1 = y (1 thru 5). > > END REPEAT. > > RECODE depress0 depress1 ( 2 thru 5 =1). > > COMPUTE nodepress = depress0 * 10 + depress1. > > FREQUENCIES nodepress. > > *test to identify cases. > > LIST id nodepress depress0 depress1 /cases 20. > > *if it works. > > LIST id nodepress depress0 depress1. > > > > DO REPEAT > > x = T0_Anx_1 to T0_Anx_n > > /y = T1_Anx_1 to T1_Anx_n > > Count anx0 = x (1 thru 5) > > /anx1 = y (1 thru 5). > > END REPEAT. > > RECODE anx0 anx1 ( 2 thru 5 =1). > > COMPUTE noanx = anx0 * 10 + anx1. > > FREQUENCIES noanx. > > *test to identify cases. > > LIST id noanx anx0 anx1 /cases 20. > > *if it works. > > LIST id noanx anx0 anx1. > > > > John F Hall > > [Retired academic survey researcher] > > IBM-SPSS Academic Author 9900074 > > > > Email: > johnfhall@ > <mailto: > johnfhall@ > > > > 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-l > ife.html > > > > -----Original Message----- > From: SPSSX(r) Discussion < > [hidden email] > > On Behalf Of Salina > Sent: 11 September 2118 13:36 > To: > [hidden email] > Subject: SPSS syntax - calculating survey attrition at different time > points > > > > Hi > > > > > > I am new to SPSS syntax and was wondering if anyone could help me with the > following. I have two different questionnaires Depression (eg. > T1_Depress_1, > T1_Depress_2,T1_Depress_3, etc.) and Anxiety (e.g, T1_Anx_1, T1_Anx_2, > T1_Anx_3, etc.) at two time-points (Baseline and Follow-up).All the items > are scored on a Liket Scale 1-5. I would like to create a new variable > that > allows me to find out how many people completed and how many people did > not > complete each of the questionnaires at each of the two time-points. > > > > > > > > -- > > Sent from: <http://spssx-discussion.1045642.n5.nabble.com/> > http://spssx-discussion.1145642.n5.nabble.com/ > > > > ===================== > > To manage your subscription to SPSSX-L, send a message to > > <mailto: > [hidden email] > > > [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 ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
Free forum by Nabble | Edit this page |