* C:\C_Ad_Hoc\spssx-l\Z-2005b\ . * 2005-11-17 Gardner - Person Mean Substitution.SPS. * 10:03 11/17/2005 . * In response to question . * From: "Kathryn Gardner" . * To: wrristow@mindspring.com . * Subject: Re: Person Mean Substitution . * Date: Thu, 17 Nov 2005 11:21:03 +0000 . * Original list posting * Date: Thu, 10 Nov 2005 11:21:44 -0500 . * From: Kathryn Gardner . * Subject: Person Mean Substitution . * To: SPSSX-L@LISTSERV.UGA.EDU . * Original * "I want to use Person Mean Substitution for dealing with . * my missing data. I have some syntax which creates my scale. * score by inserting the Person Mean where appropriate. . * However, I would like some syntax which just inserts the . * individual Person Mean for all missing data. . * Follow-up * Clicked-up and edited syntax to open file and do some . * cosmetic clean-ups . * This loads your file. The "/KEEP =" list puts the subscale. * scores near the beginning, instead of at the end. . GET FILE "C:\A_WRR\E-mail\WRR_Desk\Attachments\test PMS.sav" /KEEP = USERID ipip_ex TO ipip_op ALL. * These are some odds and ends to make the displayed file . * more compact and readable. . VARIABLE WIDTH q1ipip TO q50ipip (5) ipip_ex TO ipip_op (6) var00001 (7) . FORMATS q1ipip TO q50ipip ipip_ex TO ipip_op var00001 (F4). VARIABLE WIDTH userid (6) . FORMATS USERID (F6). * This is how you're calculating the subscales . COMPUTE IPIP_EX = q1ipip + q6ipip + q11ipip + q16ipip + q21ipip + q26ipip + q31ipip + q36ipip + q41ipip + q46ipip. COMPUTE IPIP_AG = q2ipip + q7ipip + q12ipip + q17ipip + q22ipip + q27ipip + q32ipip + q37ipip + q42ipip + q47ipip. COMPUTE IPIP_CO = q3ipip + q8ipip + q13ipip + q18ipip + q23ipip + q28ipip + q33ipip + q38ipip + q43ipip + q48ipip. COMPUTE IPIP_NE = q4ipip + q9ipip + q14ipip + q19ipip + q24ipip + q29ipip + q34ipip + q39ipip + q44ipip + q49ipip. COMPUTE IPIP_OP = q5ipip + q10ipip + q15ipip + q20ipip + q25ipip + q30ipip + q35ipip + q40ipip + q45ipip + q50ipip. * This makes the subscales a little easier to read . FORMATS IPIP_EX TO IPIP_OP (F5). * You seem to do something like this for your missing data . RECODE IPIP_EX TO IPIP_OP (MISSING=-99). MISSING VALUES IPIP_EX TO IPIP_OP (-99). * And this is what you get . LIST USERID IPIP_EX TO IPIP_OP. * Here's the mean of the non-missing values of the subscales . COMPUTE OVRL_MN = MEAN(IPIP_EX TO IPIP_OP). FORMATS OVRL_MN (F6.2). * And this is what you get . LIST USERID IPIP_EX TO IPIP_OP OVRL_MN. * Now, get rid of the old values of the subscales: . COMPUTE IPIP_EX = $SYSMIS. COMPUTE IPIP_AG = $SYSMIS. COMPUTE IPIP_CO = $SYSMIS. COMPUTE IPIP_NE = $SYSMIS. COMPUTE IPIP_OP = $SYSMIS. * ............................................................. . * If you want to compute the subscales as if the mean of the . * non-missing items in that subscale is substituted for the . * missing items, here's how: . * First, calculate the subscales as the MEAN (not sum) that you . * get if you ignore missing values. That's the same as you get . * if you substitute the mean of the non-missing values for the . * missing values . COMPUTE IPIP_EX = MEAN(q1ipip, q6ipip, q11ipip, q16ipip, q21ipip, q26ipip, q31ipip, q36ipip, q41ipip, q46ipip). COMPUTE IPIP_AG = MEAN(q2ipip , q7ipip , q12ipip, q17ipip, q22ipip, q27ipip, q32ipip, q37ipip, q42ipip, q47ipip). COMPUTE IPIP_CO = MEAN(q3ipip , q8ipip , q13ipip, q18ipip, q23ipip, q28ipip, q33ipip, q38ipip, q43ipip, q48ipip). COMPUTE IPIP_NE = MEAN(q4ipip , q9ipip , q14ipip, q19ipip, q24ipip, q29ipip, q34ipip, q39ipip, q44ipip, q49ipip). COMPUTE IPIP_OP = MEAN(q5ipip , q10ipip, q15ipip, q20ipip, q25ipip, q30ipip, q35ipip, q40ipip, q45ipip, q50ipip). * Format so you can see the decimals . FORMATS IPIP_EX TO IPIP_OP (F5.2). * And this is what you have . LIST USERID IPIP_EX TO IPIP_OP. * To change from average to sum, multiply by the number of items. * in the subscale, which is 10 in each case. . COMPUTE IPIP_EX = 10*IPIP_EX. COMPUTE IPIP_AG = 10*IPIP_AG. COMPUTE IPIP_CO = 10*IPIP_CO. COMPUTE IPIP_NE = 10*IPIP_NE. COMPUTE IPIP_OP = 10*IPIP_OP. * Format without the decimals . FORMATS IPIP_EX TO IPIP_OP (F5). * And this is what you have . LIST USERID IPIP_EX TO IPIP_OP. * Here's the mean of the non-missing values of the subscales . * (but I don't think you'll have any missing subscale values) . COMPUTE OVRL_MN = MEAN(IPIP_EX TO IPIP_OP). FORMATS OVRL_MN (F6.2). * And this is what you get . LIST USERID IPIP_EX TO IPIP_OP OVRL_MN.