Is there a script that already exists to remove level of statistical
significance and sample size from Correlation pivot tables? Currently I double-click on the table, highlight both rows then hide them. I am interested in making it an auto-script. I have to repeat this just a few too many times right now. Thank you very much. Zachary [hidden email] |
The easiest way to hide this information manually is to pivot the Statistics dimension into the layer. That is a simple activate and drag the Statistic icon in the tray into the Layer dimension. Still manual, admittedly, but if that is what you are doing, putting this action into an autoscript would not be hard.
OMS could do this via syntax for its output, but that, of course, is not what you see in the Viewer. Regards, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Feinstein, Zachary Sent: Tuesday, October 03, 2006 5:49 PM To: [hidden email] Subject: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Is there a script that already exists to remove level of statistical significance and sample size from Correlation pivot tables? Currently I double-click on the table, highlight both rows then hide them. I am interested in making it an auto-script. I have to repeat this just a few too many times right now. Thank you very much. Zachary [hidden email] |
In reply to this post by Feinstein, Zachary
Here is a script for this. Right-click on correlations in the outline under correlation and make this code the body of the autoscript sub. Turn it on in the Scripts tab of Edit/Options.
Sub Correlations_Table_Correlations_Create(objPivotTable As Object, objOutputDoc As Object, lngIndex As Long) 'Autoscript 'Trigger Event: Correlations Table Creation after running Correlations procedure. Dim objPivotManager As ISpssPivotMgr Dim objRow As ISpssDimension Dim intCount As Integer Set objPivotManager = objPivotTable.PivotManager ' Search for the row dimension named "Statistics" and pivot it to the first layer dimension: intCount = objPivotManager.NumRowDimensions For I = 0 To intCount -1 Set objRow = objPivotManager.RowDimension(I) If objRow.DimensionName = "Statistics" Then objRow.MoveToLayer(0) Exit For End If Next End Sub Enjoy -----Original Message----- From: Peck, Jon Sent: Tuesday, October 03, 2006 7:41 PM To: 'Feinstein, Zachary'; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables The easiest way to hide this information manually is to pivot the Statistics dimension into the layer. That is a simple activate and drag the Statistic icon in the tray into the Layer dimension. Still manual, admittedly, but if that is what you are doing, putting this action into an autoscript would not be hard. OMS could do this via syntax for its output, but that, of course, is not what you see in the Viewer. Regards, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Feinstein, Zachary Sent: Tuesday, October 03, 2006 5:49 PM To: [hidden email] Subject: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Is there a script that already exists to remove level of statistical significance and sample size from Correlation pivot tables? Currently I double-click on the table, highlight both rows then hide them. I am interested in making it an auto-script. I have to repeat this just a few too many times right now. Thank you very much. Zachary [hidden email] |
In reply to this post by Feinstein, Zachary
Thank you for the code.
I receive an "Unknown Name" error message when I substitute the below code into the Correlations_Table_Correlations_Create routine. Do I need to run the correlations somehow with the Dimension label showing up? How would I do this if it is the culprit? Lastly, I commented out the rest of the code that was already in the routine in the Autoscript file. Is there a way to add this Autoscript to the existing Autoscript file under a different routine name? I would wonder how SPSS would identify then that it does this automatically after running correlations though. Still refreshing on the scripts stuff... Thanks. Zachary -----Original Message----- From: Peck, Jon [mailto:[hidden email]] Sent: Tuesday, October 03, 2006 8:19 PM To: Feinstein, Zachary; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Here is a script for this. Right-click on correlations in the outline under correlation and make this code the body of the autoscript sub. Turn it on in the Scripts tab of Edit/Options. Sub Correlations_Table_Correlations_Create(objPivotTable As Object, objOutputDoc As Object, lngIndex As Long) 'Autoscript 'Trigger Event: Correlations Table Creation after running Correlations procedure. Dim objPivotManager As ISpssPivotMgr Dim objRow As ISpssDimension Dim intCount As Integer Set objPivotManager = objPivotTable.PivotManager ' Search for the row dimension named "Statistics" and pivot it to the first layer dimension: intCount = objPivotManager.NumRowDimensions For I = 0 To intCount -1 Set objRow = objPivotManager.RowDimension(I) If objRow.DimensionName = "Statistics" Then objRow.MoveToLayer(0) Exit For End If Next End Sub Enjoy -----Original Message----- From: Peck, Jon Sent: Tuesday, October 03, 2006 7:41 PM To: 'Feinstein, Zachary'; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables The easiest way to hide this information manually is to pivot the Statistics dimension into the layer. That is a simple activate and drag the Statistic icon in the tray into the Layer dimension. Still manual, admittedly, but if that is what you are doing, putting this action into an autoscript would not be hard. OMS could do this via syntax for its output, but that, of course, is not what you see in the Viewer. Regards, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Feinstein, Zachary Sent: Tuesday, October 03, 2006 5:49 PM To: [hidden email] Subject: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Is there a script that already exists to remove level of statistical significance and sample size from Correlation pivot tables? Currently I double-click on the table, highlight both rows then hide them. I am interested in making it an auto-script. I have to repeat this just a few too many times right now. Thank you very much. Zachary [hidden email] |
Autoscripts are tightly bound to particular names composed from the procedure name (here, Correlations), item type(here, also, Correlations), and event (here, create), but they can call other functions. So you could put the code in, say, globals.sbs and let your autoscript just call it, passing along the necessary arguments.
As for unknown name, I'd need more information about when it occurs and what it refers to. No need to have the Dimension label visible. HTH, -Jon Peck -----Original Message----- From: Feinstein, Zachary [mailto:[hidden email]] Sent: Wednesday, October 04, 2006 1:22 PM To: Peck, Jon; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Thank you for the code. I receive an "Unknown Name" error message when I substitute the below code into the Correlations_Table_Correlations_Create routine. Do I need to run the correlations somehow with the Dimension label showing up? How would I do this if it is the culprit? Lastly, I commented out the rest of the code that was already in the routine in the Autoscript file. Is there a way to add this Autoscript to the existing Autoscript file under a different routine name? I would wonder how SPSS would identify then that it does this automatically after running correlations though. Still refreshing on the scripts stuff... Thanks. Zachary -----Original Message----- From: Peck, Jon [mailto:[hidden email]] Sent: Tuesday, October 03, 2006 8:19 PM To: Feinstein, Zachary; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Here is a script for this. Right-click on correlations in the outline under correlation and make this code the body of the autoscript sub. Turn it on in the Scripts tab of Edit/Options. Sub Correlations_Table_Correlations_Create(objPivotTable As Object, objOutputDoc As Object, lngIndex As Long) 'Autoscript 'Trigger Event: Correlations Table Creation after running Correlations procedure. Dim objPivotManager As ISpssPivotMgr Dim objRow As ISpssDimension Dim intCount As Integer Set objPivotManager = objPivotTable.PivotManager ' Search for the row dimension named "Statistics" and pivot it to the first layer dimension: intCount = objPivotManager.NumRowDimensions For I = 0 To intCount -1 Set objRow = objPivotManager.RowDimension(I) If objRow.DimensionName = "Statistics" Then objRow.MoveToLayer(0) Exit For End If Next End Sub Enjoy -----Original Message----- From: Peck, Jon Sent: Tuesday, October 03, 2006 7:41 PM To: 'Feinstein, Zachary'; [hidden email] Subject: RE: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables The easiest way to hide this information manually is to pivot the Statistics dimension into the layer. That is a simple activate and drag the Statistic icon in the tray into the Layer dimension. Still manual, admittedly, but if that is what you are doing, putting this action into an autoscript would not be hard. OMS could do this via syntax for its output, but that, of course, is not what you see in the Viewer. Regards, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Feinstein, Zachary Sent: Tuesday, October 03, 2006 5:49 PM To: [hidden email] Subject: [SPSSX-L] Script to Remove Significance Level and Sample Size From Correlation Pivot Tables Is there a script that already exists to remove level of statistical significance and sample size from Correlation pivot tables? Currently I double-click on the table, highlight both rows then hide them. I am interested in making it an auto-script. I have to repeat this just a few too many times right now. Thank you very much. Zachary [hidden email] |
Free forum by Nabble | Edit this page |