I have a production process involving a number of SPSS syntax files I want
to automate. I work for an HMO in the Northeastern US and one of my responsibilities is to identify those members of ours that we feel would benefit from enrollment in a program to help them manage their specific disease condition, like diabetes or heart failure. At present, I run 8 or 9 different syntax files for each of 16 different disease condition programs. For now, I do this only occassionally, but its possible that this might need to be done monthly. So, I would like to find a way to run these syntax files in an automated fashion. Programatically, I am bilingual -- I write code in SPSS and SAS, though I'm more fluent in SAS. In SAS, I would construct macros that would allow me to change one or two parameters at the beginning of a program file that would specify the time period I want to look at, the disease condition I am identifying for and any other special parameter settings. Would this type of automation require Python scripting or use of the production facility? Just so you know, we're still using SPSS version 10.0.7. Thanks for your advice. Bruno Berszoner Tufts Health Plan |
Hi Bruno,
If you have 8 or 9 syntaxes you could invoke them using INCLUDE FILE = "filelocationandname.sps", comparable to INSERT in SAS. Keep in mind though that SPSS is picky with syntaxes read in this 'batch mode', as opposed to the 'interactive mode'. Broadly speaking it implies that you MUST use indents in cases such as: VALUE LABEL myvar 1 'blah' 2 'bleeh'. Writing macros may be useful to specify e.g. date ranges. The syntaxis is quite similar, but not nearly as flexible as, to SAS. I never used the production facility, so I'm not sure whether you'll need it. I don't think you do. Nor do you need Python, unless you really want to tweak your output. I'd use ODS or DDE in SAS for that instead of learning VB. A nice 'master file' might be one with one INCLUDE to compile the macro(s) and subsequently the month-specific macro call(s). Cheers! Albert-Jan --- Bruno Berszoner <[hidden email]> wrote: > I have a production process involving a number of > SPSS syntax files I want > to automate. I work for an HMO in the Northeastern > US and one of my > responsibilities is to identify those members of > ours that we feel would > benefit from enrollment in a program to help them > manage their specific > disease condition, like diabetes or heart failure. > > At present, I run 8 or 9 different syntax files for > each of 16 different > disease condition programs. For now, I do this only > occassionally, but its > possible that this might need to be done monthly. > So, I would like to find > a way to run these syntax files in an automated > fashion. > > Programatically, I am bilingual -- I write code in > SPSS and SAS, though I'm > more fluent in SAS. In SAS, I would construct > macros that would allow me > to change one or two parameters at the beginning of > a program file that > would specify the time period I want to look at, the > disease condition I am > identifying for and any other special parameter > settings. > > Would this type of automation require Python > scripting or use of the > production facility? Just so you know, we're still > using SPSS version > 10.0.7. > > Thanks for your advice. > > Bruno Berszoner > Tufts Health Plan > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
In reply to this post by Bruno Berszoner
I have to say that the ability to do this kind of thing is immensely improved in SPSS 14 by using the programmability features and Python compared with SPSS 10 (along with a vast collection of other SPSS functionality). You can organize your work into sets of INCLUDE files (superseded by friendlier INSERT files in more recent versions) and macros in v10, but it will be harder. For some kinds of tasks SaxBasic scripts would be required with version 10.
Regards, Jon Peck SPSS -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruno Berszoner Sent: lunes, 21 de agosto de 2006 8:38 To: [hidden email] Subject: [SPSSX-L] Automating SPSS I have a production process involving a number of SPSS syntax files I want to automate. I work for an HMO in the Northeastern US and one of my responsibilities is to identify those members of ours that we feel would benefit from enrollment in a program to help them manage their specific disease condition, like diabetes or heart failure. At present, I run 8 or 9 different syntax files for each of 16 different disease condition programs. For now, I do this only occassionally, but its possible that this might need to be done monthly. So, I would like to find a way to run these syntax files in an automated fashion. Programatically, I am bilingual -- I write code in SPSS and SAS, though I'm more fluent in SAS. In SAS, I would construct macros that would allow me to change one or two parameters at the beginning of a program file that would specify the time period I want to look at, the disease condition I am identifying for and any other special parameter settings. Would this type of automation require Python scripting or use of the production facility? Just so you know, we're still using SPSS version 10.0.7. Thanks for your advice. Bruno Berszoner Tufts Health Plan |
In reply to this post by Albert-Jan Roskam
Thanks for your advice on how to pull this task off. Do you know of any
good (preferably free) sources to learn more about the particulars of writing macros? Bruno Berszoner "Albert-jan Roskam" <[hidden email]> To "Bruno Berszoner" 08/21/2006 10:47 <[hidden email]>, AM [hidden email] cc Subject Re: Automating SPSS Hi Bruno, If you have 8 or 9 syntaxes you could invoke them using INCLUDE FILE = "filelocationandname.sps", comparable to INSERT in SAS. Keep in mind though that SPSS is picky with syntaxes read in this 'batch mode', as opposed to the 'interactive mode'. Broadly speaking it implies that you MUST use indents in cases such as: VALUE LABEL myvar 1 'blah' 2 'bleeh'. Writing macros may be useful to specify e.g. date ranges. The syntaxis is quite similar, but not nearly as flexible as, to SAS. I never used the production facility, so I'm not sure whether you'll need it. I don't think you do. Nor do you need Python, unless you really want to tweak your output. I'd use ODS or DDE in SAS for that instead of learning VB. A nice 'master file' might be one with one INCLUDE to compile the macro(s) and subsequently the month-specific macro call(s). Cheers! Albert-Jan --- Bruno Berszoner <[hidden email]> wrote: > I have a production process involving a number of > SPSS syntax files I want > to automate. I work for an HMO in the Northeastern > US and one of my > responsibilities is to identify those members of > ours that we feel would > benefit from enrollment in a program to help them > manage their specific > disease condition, like diabetes or heart failure. > > At present, I run 8 or 9 different syntax files for > each of 16 different > disease condition programs. For now, I do this only > occassionally, but its > possible that this might need to be done monthly. > So, I would like to find > a way to run these syntax files in an automated > fashion. > > Programatically, I am bilingual -- I write code in > SPSS and SAS, though I'm > more fluent in SAS. In SAS, I would construct > macros that would allow me > to change one or two parameters at the beginning of > a program file that > would specify the time period I want to look at, the > disease condition I am > identifying for and any other special parameter > settings. > > Would this type of automation require Python > scripting or use of the > production facility? Just so you know, we're still > using SPSS version > 10.0.7. > > Thanks for your advice. > > Bruno Berszoner > Tufts Health Plan > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
Hi Bruno,
Your first entry point would be the SPSS syntax guide (the pdf file included with every installation) under DEFINE - !ENDDEFINE. Next, you can check www.spsstools.net, and maybe the archives of this listserv. Cheers! Albert-Jan --- Bruno Berszoner <[hidden email]> wrote: > Thanks for your advice on how to pull this task off. > Do you know of any > good (preferably free) sources to learn more about > the particulars of > writing macros? > > Bruno Berszoner > > > > > > "Albert-jan > Roskam" > <[hidden email]> > To > "Bruno > Berszoner" > 08/21/2006 10:47 > <[hidden email]>, > AM > [hidden email] > > cc > > > Subject > Re: > Automating SPSS > > > > > > > > > > > Hi Bruno, > > If you have 8 or 9 syntaxes you could invoke them > using INCLUDE FILE = "filelocationandname.sps", > comparable to INSERT in SAS. Keep in mind though > that > SPSS is picky with syntaxes read in this 'batch > mode', > as opposed to the 'interactive mode'. Broadly > speaking > it implies that you MUST use indents in cases such > as: > VALUE LABEL myvar > 1 'blah' > 2 'bleeh'. > > Writing macros may be useful to specify e.g. date > ranges. The syntaxis is quite similar, but not > nearly > as flexible as, to SAS. I never used the production > facility, so I'm not sure whether you'll need it. I > don't think you do. Nor do you need Python, unless > you > really want to tweak your output. I'd use ODS or DDE > in SAS for that instead of learning VB. > > A nice 'master file' might be one with one INCLUDE > to > compile the macro(s) and subsequently the > month-specific macro call(s). > > Cheers! > Albert-Jan > > > --- Bruno Berszoner > <[hidden email]> > wrote: > > > I have a production process involving a number of > > SPSS syntax files I want > > to automate. I work for an HMO in the > Northeastern > > US and one of my > > responsibilities is to identify those members of > > ours that we feel would > > benefit from enrollment in a program to help them > > manage their specific > > disease condition, like diabetes or heart failure. > > > > At present, I run 8 or 9 different syntax files > for > > each of 16 different > > disease condition programs. For now, I do this > only > > occassionally, but its > > possible that this might need to be done monthly. > > So, I would like to find > > a way to run these syntax files in an automated > > fashion. > > > > Programatically, I am bilingual -- I write code in > > SPSS and SAS, though I'm > > more fluent in SAS. In SAS, I would construct > > macros that would allow me > > to change one or two parameters at the beginning > of > > a program file that > > would specify the time period I want to look at, > the > > disease condition I am > > identifying for and any other special parameter > > settings. > > > > Would this type of automation require Python > > scripting or use of the > > production facility? Just so you know, we're > still > > using SPSS version > > 10.0.7. > > > > Thanks for your advice. > > > > Bruno Berszoner > > Tufts Health Plan > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
Free forum by Nabble | Edit this page |