Products | Versions |
---|---|
Spotfire Statistica | 13.0 and higher |
A Statistica Visual Basic (SVB) Analysis Configuration, like an IQC Analysis Configuration, requires a Data Configuration. However, whereas an IQC Analysis Configuration runs one of several predefined analyses, such as an XBar chart or a C chart, an SVB Analysis Configuration runs an analysis that is defined in an SVB macro.
So, before setting up an SVB Analysis Configuration, you must first create the SVB macro that will be run by that Analysis Configuration. Remember that the data that will be analyzed by the SVB macro comes from a Data Configuration. So when creating the SVB macro, you should use the data from that Data Configuration. This example utilizes a Data Configuration defined in the previous examples.
1. Select the Petroleum Data Configuration created earlier.
2. In the properties page, click the "Explore" button.
3.If the Data/Data Entry Setup - Explore dialog box is displayed, click "Run".
This starts Statistica and displays a spreadsheet containing the data retrieved by the Data Configuration.
Now you can use any of the Statistica tools to manually analyze this data. Once you have completed the analysis, you can record an SVB macro that automatically reproduces that analysis.
4. Create a histogram to show the number of measurements from each category. On the Statistica Graphs tab, in the Common group, click "Histogram".
5. In the 2D Histograms dialog box, click the "Variables" button.
6. In the variable selection dialog box, select "Category".
7.Click "OK" in the variable specification dialog box, and click "OK" in the 2D Histograms dialog box. A histogram is created, showing the number of measurements from each category.
8. Record this analysis as an SVB macro. Click the "2D Histograms" button in the lower-left corner of Statistica to maximize the 2D Histograms dialog box.
9. Click the "Options" button, and on the menu, select "Create Macro".
10. In the New Macro dialog box, name the macro CategoryHistogram.
11. Click "OK". An SVB macro is displayed. When this macro is run, it produces the histogram that was just created manually.
12. Save this SVB macro file, and then close Statistica.
13. Create the SVB Analysis Configuration. Return to Enterprise Manager, right-click the folder, and select "New Analysis Configuration".
14. Select the Petroleum Data Configuration.
15. Click "OK".
16. Click "OK" in this dialog box to give the Analysis Configuration the same user permissions as the Data Configuration. The properties page of the new Analysis Configuration is displayed.
17. Change the Name to PetroleumHistogram. In the Type drop-down list box, select "SVB Analysis".
18. In the Enterprise Manager tree view, expand the Analysis Configuration, and select the "SVB Program node".
19. Click the "Open" button. A Windows file selection dialog box is displayed.
20. Browse to the CategoryHistogram.svb file created previously, and click "Open".
The text box in the properties page is filled with the text of the CategoryHistogram.svb macro. The first few lines contain references to libraries used by the macro.
21. Save the Analysis Configuration.
22. To test this SVB Analysis Configuration, select the PetroleumHistogram node in the tree view. Run the SVB Analysis Configuration by clicking the "Run" button or by clicking the green arrow icon on the toolbar. Statistica starts, and the histogram is displayed.