Performing record sampling
Concept Information
You can create a new table that contains a representative sample of the data in the active table.
Record sampling is appropriate if you are interested in the rate of deviation from a prescribed control.
Note
This procedure does not include filtering (IF statements) or scope parameters because applying these options compromises the validity of a sample.
Steps
Note
Detailed information appears after the steps. See Sample dialog box options.
Do not include the thousands separator, or the percentage sign, when you specify values. These characters prevent the command from running, or cause errors.
- In the Navigator, open the table you want to draw a sample from.
- Select Sampling > Record/Monetary Unit Sampling > Sample.
- On the Main tab, select Record.
- In the Sample Parameters panel, specify a sample selection method:
- Fixed Interval
- Cell
- Random
- Enter the sample parameters for the selection method you chose:
Selection method Sample parameters Fixed Interval - Interval
- Start (optional)
Cell - Interval
- Seed (optional)
- Algorithm – leave Mersenne Twister selected
Random - Size
- Seed (optional)
- Population (optional) – prefilled with the number of records in the table
- Algorithm – leave Mersenne Twister selected
Note
Sample parameters are explained in detail below.
- In the To text box, specify the name of the Analytics table that will contain the output results.
- On the More tab, select one
of the following:
RecordThe entire record is included in the output table.
Fields Only the selected fields are included in the output table.
- If you chose Fields, select the field(s) to include in the output table from the Extract Fields list.
- Optional. Select Report Selection Order if you want to add the ORDER field to the output results.
Note
Report Selection Order is available only if both the Random selection method and Fields output are selected.
- Click OK.
Sample dialog box options
The tables below provide detailed information about the options in the Sample dialog box.
Main tab
Options – Sample dialog box | Description |
---|---|
MUS
Record |
The sample type:
|
Sample On |
Not used for record sampling. |
Fixed Interval |
Specifies that the fixed interval method is used for sample selection. Samples are selected based on an interval value and a start number that you specify. For more information, see Fixed interval selection method. If you selected Fixed Interval enter the following values:
|
Cell |
Specifies that the cell method is used for sample selection. The data set is divided into multiple equal-sized cells or groups, and one sample is randomly selected from each cell. The interval value dictates the size of each cell. For more information, see Cell selection method. If you selected Cell enter the following values:
|
Random |
Specifies that the random method is used for sample selection. Samples are randomly selected from the entire data set. For more information, see Random selection method. If you selected Random enter the following values:
|
If |
Caution Do not create an IF statement or filter records in the course of sampling. Doing so compromises the validity of the sample. For more information, see Conditional sampling. |
To | The name and location of the output table.
Regardless of where you save the output table, it is added to the open project if it is not already in the project. If Analytics prefills a table name, you can accept the prefilled name, or change it. Note Analytics table names are limited to 64 alphanumeric characters, not including the .FIL extension. The name can include the underscore character ( _ ), but no other special characters, or any spaces. The name cannot start with a number. |
Local |
If you are connected to a server table, specifies where to save the output table.
|
Use output table | Specifies whether the Analytics table containing the output results opens automatically upon completion of the operation. |
More tab
Options – Sample dialog box | Description |
---|---|
Scope panel |
Caution Do not limit which records are processed in the course of sampling. Doing so compromises the validity of the sample. For more information, see Conditional sampling. |
Record Fields |
Specifies whether the output table includes the entire record, or selected fields. If you choose Fields, do one of the following: Select the field(s) to extract from the Extract Fields list. Click Extract Fields to select the field(s), or to create an expression. The order in which you select the fields is the order in which the columns appear in the results. If you are appending results to an existing Analytics table, the column selection and order must be identical to the column selection and order in the existing table. |
Report Selection Order |
(Optional) Adds the ORDER field to the output results. This field displays the order in which each record is randomly selected. Note Report Selection Order is available only if both the Random selection method and Fields output are selected. |
Append To Existing File | Specifies that the output results are appended (added) to the end of
an existing Analytics table. Note Leaving Append To Existing File deselected is recommended if you are uncertain whether the output results and the existing table have an identical data structure. For more information about appending and data structure, see Appending output results to an existing table. |
OK | Executes the operation. If the overwrite prompt appears, select the appropriate option. If you are expecting the Append option to appear and it does not, click No to cancel the operation and see Appending output results to an existing table. |