Assigning Statistics to Variables

Prerequisites

Ensure that the variables (columns in the input file) to which you want to write the selected statistics already exist in the current data file. Create those variables or fields (in a database) prior to using this option. Refer also to Streaming Database Connector Technology for details on how to define the cursor to permit writing of results (example, predicted classifications) to an external database.

Procedure

  1. Click the Save predicted & residual values to input data button on the Rapid Deployment of Predictive Models dialog box - Save results tab to display the Assign statistics to variables for saving in input data dialog box.
  2. Use the options in this dialog box to assign the statistics of interest (predicted values or classifications, prediction probabilities, residuals) to variables (columns) in the current input data file (or streaming connection to an external database).
    The statistics are written into the selected variables in the input spreadsheet (or database if the input data is a connection via a Streaming Database Connector).
    Options Description
    Statistics In the Statistics (upper-left) list box, select the statistics (one at a time) that you want to write into the current input data file or database. The appropriate variable types will also be shown along with all statistics that will be computed, and can be written into the input data. Note that not all assignments may be valid, and the entries shown in the Variables (upper-right) list box will be updated to show only those variables to which the selected statistic can be written. For example, you cannot write text values to a database field that is not of type text; however, Statistica Data Spreadsheets are quite flexible, and most data types in Statistica Spreadsheets can accept numeric or text values.
    Variables Select the variable to which you want to write the chosen statistic (from the Statistics list box), and then click the Assign button to make the assignment (of statistic to variable or field in the database). The Variables (upper-right) list box will list all variables (and their types) currently available in the input data file (or database connected via a Streaming Database Connector) to which you can write the statistic selected in the Statistics list box. After selecting a statistic from the Statistics list box, the available list of variables in the Variables list box may update to reflect the variables of the correct data type to which the selected information can be written. For example, you cannot write text values to a database field that is not of type text; however, Statistica Data Spreadsheets are quite flexible and most data types in Statistica Spreadsheets can accept numeric or text values.
    Assign Click the Assign button to finalize the assignment of the chosen statistic (selected in the Statistics list box) to a variable or database field (selected in the Variables list box). The respective statistic (e.g., predicted value, classification, classification probabilities, etc.) will be written to the chosen variable in the current input data file or database.
    Assigned stats/Assigned vars This list box displays the assignments of statistics to variables in the current input data file (or database when the current input data is a connection to an external database via a Streaming Database Connector). Any statistics in the Statistics list box that are not selected (assigned to any variable) will be ignored.
    Unassign To undo an assignment of a statistic to a particular variable or field in the database, highlight the respective Assigned stats/Assigned vars pair, and then click the Unassign button.
    OK Click this button to begin the computations, i.e., to write the selected statistics to the selected variables or database fields for each case.
    Cancel Click this button to close this dialog box without computing and saving any predicted values, classifications, or related statistics.