My point was that SPSS does not produce
xml according to this schema. Doing that would require some Python
programming that would manipulate the xml dictionary that SPSS does produce
or some other fairly elaborate code. That has nothing to do with
whether the question is sensible or not. It was an answer to the
original question and a suggestion for a workaround.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Jon Johnson <[hidden email]> To: [hidden email], Date: 06/18/2013 10:28 AM Subject: Re: [SPSSX-L] Triple S exports with multiple variables Sent by: "SPSSX(r) Discussion" <[hidden email]> Can I suggest that people who do not know anything about Triple-S refrain from commenting This is actually a very sensible question and is about how to manipulate SPSS before writing it out in a specific file format called Triple-S. Thanks Jon Johnson From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck Sent: 18 June 2013 14:26 To: [hidden email] Subject: Re: Triple S exports with multiple variables I have no idea what Triple S expects, but are you sure that you can't transfer the data in Statistics to the other package using one of the many formats Statistics can write to (Excel, SAS, Stata, csv, fixed ascii, databases,...)? Jon Peck (no "h") aka Kim Senior Software Engineer, IBM peck@... phone: 720-342-5621 From: Amy_Hynd <amyhtlee@...> To: [hidden email], Date: 06/18/2013 02:46 AM Subject: Re: [SPSSX-L] Triple S exports with multiple variables Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi, I am using SPSS Statistics and I am using the script (link above) to produce the dictionary as XML. I have the data in SPSS but it needs to be imported into another platform for further research and the quickest way that this can be done is via triple S. So at this point, no analysis is required. Jon, I think you are right, and I don't understand triple s entirely, but I know the variable needs to turn into a spread variable?So it would be B3, rather than B3_01, B3_02 - in the same way that MRSETS create it I assume? I'm going to try and refer the script to if it in MRSET =multiple=spread? Do you think that this may work? Thanks -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Triple-S-exports-with-multiple-variables-tp5720731p5720783.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@... (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 Bruce Weaver
Thanks Gene, Javier and Bruce (also sorry about replying to an existing email). I am using Bruce's syntax because it allows me to keep everything in the same file. This has saved me days of coding and I am so grateful for the help and the alternative syntax (use of aggregate) because I can see uses for that as I move through this project.And Javier, I understood most of your e-mail without having to break out my Spanish-English dictionary :). Thanks
again! Zeda From: Bruce Weaver <[hidden email]> To: [hidden email] Sent: Tuesday, June 18, 2013 11:03 AM Subject: Re: Creating a new variable from duplicate and non-duplicate records First, note that by replying to an old message (rather than starting a new thread), you caused your post to become buried in the Triple S exports thread <http://spssx-discussion.1045642.n5.nabble.com/Triple-S-exports-with-multiple-variables-td5720731.html> in the Nabble archive for this list. Second, does the following do what you want? * Read in some sample data. NEW FILE. DATASET CLOSE all. DATA LIST list / ID CaseNumber (2f5.0) CaseType (a25). BEGIN DATA 1 68 theft 1 68 theft 1 72 drugs 2 208 assault 2 108 DWI 3 319 Burg 4 522 Drugs 4 533 Theft 4 556 Assault 4 556 Assault 4 556 Assault END DATA. SORT CASES BY ID CaseNumber. COMPUTE FirstCase = ($casenum EQ 1) OR NOT (ID EQ Lag(ID) and CaseNumber EQ Lag(CaseNumber)). COMPUTE Duplicate = NOT FirstCase. FORMATS FirstCase Duplicate (f1). LIST. FILTER BY FirstCase. * Do your analysis. USE ALL. FILTER OFF. Zd Gibbs wrote > Gene, > > I tried that and it just replicated the data from casetype to > First(casetype) - I got the same data in each of the two variables (using > pasted syntax below). Is it possible to turn the duplicate casetypes into > missing so that data is excluded from analyses? > > SORT CASES BY ID casenum. > AGGREGATE >  /OUTFILE=* MODE=ADDVARIABLES >  /PRESORTED >  /BREAK=ID casenum >  /casetype_first=FIRST(casetype). > > Zeda > > > ________________________________ > From: "Maguin, Eugene" < > emaguin@ > > > To: > [hidden email] > > Sent: Tuesday, June 18, 2013 10:16 AM > Subject: Re: Creating a new variable from duplicate and non-duplicate > records > > > > You may want something different but you could use Aggregate and break on > id and case number or case type. That would result in two records for > id=1, two for id=2, one for id=3 and three for id=4. > Gene Maguin >  > From:SPSSX(r) Discussion [mailto: > [hidden email] > ] On Behalf Of Zd Gibbs > Sent: Tuesday, June 18, 2013 10:49 AM > To: > [hidden email] > Subject: Creating a new variable from duplicate and non-duplicate records >  >  > Hello >  > In my file I have adult offender ID’s with many court cases. Some IDs have > duplicate cases, which I need to keep because they have different hearing > outcomes, some cases within the same ID are not duplicates and a few IDs > have no duplicate cases.  Within each ID, I want to grab one of the > duplicate case types and all of the unique case types and put into a > different variable (UniqueCases).  The casetype is numerical but I am > using text in the example to illustrate what I am trying to achieve.  >  > How do I get to uniquecases? >  > ID           CaseNumber   CaseType            dup       >                       UniqueCases > 1             68                          theft                    > 1                    theft > 1             68                          theft                     1 > 1             72                          drugs           >  0                    drugs > 2             208                        assault                > 0                    assault > 2             108                        DWI         >   0                    DWI > 3             319                        Burg          >  0                    Burg > 4             522                        Drugs         >  0                    Drug > 4             533                        Theft         >   0                    Theft > 4             556                        Assault                > 1                    Assault > 4             556                        Assault                1 > 4             556                        Assault                1 >  > Thanks >  > Zeda ----- -- 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. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Triple-S-exports-with-multiple-variables-tp5720731p5720792.html Sent from the SPSSX Discussion mailing list archive at 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 Art Kendall
Thank you for everyone's comments.
Yes, I agree, it has been cumbersome and the import to Triple S is beyond my control. The data is to be used by a third party that utilizes a software that accepts Triple S only. I have thought about creating two files, but the third party cannot merge the data together. If the use of multiple/ spread variables is essentially a MRSET, there must be a way to script this? |
Free forum by Nabble | Edit this page |