|
Hi all,
I am doing some exploratory work involving adding variables one at a time to a base regression model. There is a large number of variables to be added one at a time and hence a large number of models to be run. Rather than manually going through them to find the significant results I would like to have SPSS create a list of the variables that were significant. For example: DV: Y Standard IVs: A and B List of IVs to be added one at a time: C, D, E, F. Model 1: Y = A B C Model 2: Y = A B D Model 3: Y = A B E Model 4: Y = A B F If variables D and E were significant (but not C) my list would look like: D E I can handle adding the variables to the model one by one but all I have come up with for the list creation so far is to use OMS to output to a file that I can then open and check for significance and then output the variable name to a file if it is significant. I can work this out programmatically, but the two main problems with this are that it involves a lot of opening and creating of files (and I expect it to therefore be rather inefficient) and I'm not sure how to collect all the variable names in one list. I learning to use the Python plugin so I imagine that that would be one way to go, but I'm open to other suggestions. Any help is appreciated! Bryan ===================== 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 |
|
You might get some misleading results with that many individual significance tests, but it is easy to cull the information you want without even resorting to Python.
Run syntax like this. This example does all the regressions at once, but there could be many regression commands between OMS and OMSEND. This will create a dataset named coef with all the coefficient statistics. Then you can use a standard SPSS filter to select out just the significant ones based on the Sig variable in that dataset. There will be multiple instances of a variable if it is significant more than once, but you could screen those out with Identify Duplicate Cases on the Data menu or by using AGGREGATE to pick the first/last/max/min instance. dataset declare coef. oms select tables /if SUBTYPES ='Coefficients' /DESTINATION outfile=coef format=SAV. REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA /CRITERIA=PIN(.05) POUT(.10) /NOORIGIN /DEPENDENT accel /METHOD=ENTER engine /METHOD=ENTER horse /METHOD=ENTER mpg /METHOD=ENTER weight. omsend. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bryan Tec Sent: Friday, June 06, 2008 7:08 AM To: [hidden email] Subject: [SPSSX-L] Creating a list of significant variables Hi all, I am doing some exploratory work involving adding variables one at a time to a base regression model. There is a large number of variables to be added one at a time and hence a large number of models to be run. Rather than manually going through them to find the significant results I would like to have SPSS create a list of the variables that were significant. For example: DV: Y Standard IVs: A and B List of IVs to be added one at a time: C, D, E, F. Model 1: Y = A B C Model 2: Y = A B D Model 3: Y = A B E Model 4: Y = A B F If variables D and E were significant (but not C) my list would look like: D E I can handle adding the variables to the model one by one but all I have come up with for the list creation so far is to use OMS to output to a file that I can then open and check for significance and then output the variable name to a file if it is significant. I can work this out programmatically, but the two main problems with this are that it involves a lot of opening and creating of files (and I expect it to therefore be rather inefficient) and I'm not sure how to collect all the variable names in one list. I learning to use the Python plugin so I imagine that that would be one way to go, but I'm open to other suggestions. Any help is appreciated! Bryan ===================== 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 |
|
In reply to this post by Bryan Tec
I may not have a firm grasp of your question, but try something like this
open a new session of SPSS. Cut, paste this syntax into a syntax window. change the GET to match your setup. Then run the syntax. GET FILE='C:\Program Files (x86)\SPSSInc\SPSS16\Samples\car_sales.sav'. DATASET NAME DataSet1 WINDOW=FRONT.REGRESSION variables= price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg /DEPENDENT price /METHOD=ENTER engine_s horsepow /METHOD=ENTER wheelbas width length curb_wgt fuel_cap mpg. Look at the Excluded Variables table and cut-and paste or OMS the table into another file so you can manipulate it. Art Kendall Social Research consultants Bryan Tec wrote: > Hi all, > > > > I am doing some exploratory work involving adding variables one at a time to > a base regression model. There is a large number of variables to be added > one at a time and hence a large number of models to be run. Rather than > manually going through them to find the significant results I would like to > have SPSS create a list of the variables that were significant. For > example: > > > > DV: Y > > Standard IVs: A and B > > List of IVs to be added one at a time: C, D, E, F. > > > > Model 1: > > > > Y = A B C > > > > Model 2: > > > > Y = A B D > > > > Model 3: > > > > Y = A B E > > > > Model 4: > > > > Y = A B F > > > > If variables D and E were significant (but not C) my list would look like: > > > > D > > E > > > > I can handle adding the variables to the model one by one but all I have > come up with for the list creation so far is to use OMS to output to a file > that I can then open and check for significance and then output the variable > name to a file if it is significant. I can work this out programmatically, > but the two main problems with this are that it involves a lot of opening > and creating of files (and I expect it to therefore be rather inefficient) > and I'm not sure how to collect all the variable names in one list. > > > > I learning to use the Python plugin so I imagine that that would be one way > to go, but I'm open to other suggestions. > > > > Any help is appreciated! > > > > Bryan > > ===================== > 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
Art Kendall
Social Research Consultants |
| Free forum by Nabble | Edit this page |
