Dear Experts, I am using casestovars command in spss 18, applying it to an aggregated file that contains Year, id1, id2, and then various scores per units (each unit is a separate row). The file looks like this: Year id1 id2 var1 var2 var3 etc. 2010 a 1 99 86 44 etc 2011 a 1 99 86 44 etc 2010 b 2 77 54 33 etc 2011 b 2 77 54 33 etc (The scores for year 2010 and 2011 are identical because year 2011 is fake data. I copied year 2010 as a placeholder for 2011 data, to prepare and test all of my syntax and have it ready when real 2011 data arrive. Real data will be the same variables as in 2010, but not the same values). I want to get my file look like this: id1 id2 Var1_mean.2010 var1_mean.2011 var2_mean.2010 var2_mean.2011 var3_mean.2010 var3_mean.2011 a 1 99 99 86 86 44 44 b 2 77 77 54 54 33 33 I’m trying to accomplish it by saying: Sort cases by stano year. CASESTOVARS /ID=Stano Orgname /INDEX=year /GROUPBY=VARIABLE. It does not give me any error messages but it completely ignores my INDEX and gives me the file looking like this: id1 id2 Var1_mean var2_mean var3_mean a 1 99 86 44 b 2 77 54 33 What am I doing wrong? Is the problem caused by having identical values in 2010 and 2011 (which won’t be the case when I get real, not fake, data?) Thank you, |
/AUTOFIX= NO
- is what invokes the option that keeps from collapsing those variables that do not vary. I learned this at the SPSS usenet group just a week ago, from Bruce W. -- Rich Ulrich ===================== 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 |
Thank you! It worked perfectly.
Katerine -----Original Message----- From: Rich Ulrich [mailto:[hidden email]] Sent: Friday, March 11, 2011 1:22 AM To: Osatuke, Katerine, VHACIN; [hidden email] Subject: RE: casestovars: why is INDEX not working? /AUTOFIX= NO - is what invokes the option that keeps from collapsing those variables that do not vary. I learned this at the SPSS usenet group just a week ago, from Bruce W. -- Rich Ulrich ===================== 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 |