Sampling consists of the following steps, each of which will be described in detail:
To confirm the number of records included in the sample extract, you can run the procedure with the Message Viewer on. This provides both the selected output and the messages confirming the sample that was extracted. For information on how to turn the Message Viewer on, see How to Set Message Viewer On.
To extract a sample using random sampling functionality:
The Sampling dialog box opens.
Calculate Sample Size
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Click the Specify Sample Size radio button to specify a user-defined sample size.
The Expected Margin of Error, based on the identified Population size and your specified Sample size, will be displayed, as shown in the image below.
The Expected Margin of Error based on the identified Population size and your specified Sample size will be displayed.
To extract a sample using random sampling functionality:
Calculate Sample Size
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Click the Specify Sample Size radio button to specify a user-defined sample size.
The Expected Margin of Error, based on the identified Population size and your specified Sample size, will be displayed, as shown in the image below.
The Expected Margin of Error based on the identified Population size and your specified Sample size will be displayed.
To extract a sample using numeric stratified sampling based on user-defined ranges of a numeric field within the data:
The Sampling dialog box opens.
Each stratum or group is defined by the upper limit for the data value of the current field. Strata are selected in the order they are defined. Therefore, the criteria must be entered in ascending order. In the example below, we will divide our population into four strata based on the values for Profit.
Strata |
Criteria Value Entered |
Who Qualifies |
---|---|---|
Stratum 1 |
5000 |
-∞ Profit ≤ 5000 |
Stratum 2 |
10000 |
5000 < Profit ≤ 10000 |
Stratum 3 |
50000 |
10000 < Profit ≤ 50000 |
Stratum 4 |
999999 |
50000 < Profit ≤ 999999 |
Note:
The example of strata criteria is shown in the following image.
Calculate Sample Size
Note: The value defined in the calculator is used as the default value when new stratum are created. If you want to change the default to be used each time you create a new criteria row, set the default value within the Default Response Distribution field box.
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Click the Specify Sample Size radio button, as shown in the following image.
By default, each of the stratum sample sizes is set to the value of 1, which is the minimum value allowed.
The sample size can be specified as a count or as a percentage of each stratum population.
Note: Click the Retrieve Population button to refresh and calculate the Expected Margin of Error based on the identified Population size and your overall strata sample sizes.
To extract a sample using numeric stratified sampling based on user-defined ranges of a numeric field within the data:
Each stratum or group is defined by the upper limit for the data value of the current field. Strata are selected in the order they are defined. Therefore, the criteria must be entered in ascending order. In the example below, we will divide our population into four strata based on the values for Profit.
Strata |
Criteria Value Entered |
Who Qualifies |
---|---|---|
Stratum 1 |
5000 |
-∞ Profit ≤ 5000 |
Stratum 2 |
10000 |
5000 < Profit ≤ 10000 |
Stratum 3 |
50000 |
10000 < Profit ≤ 50000 |
Stratum 4 |
999999 |
50000 < Profit ≤ 999999 |
Note:
The example of strata criteria is shown in the following image.
Calculate Sample Size
Note: The value defined in the calculator is used as the default value when new stratum are created. If you want to change the default to be used each time you create a new criteria row, set the default value within the Default Response Distribution field box.
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Click the Specify Sample Size radio button, as shown in the following image.
By default, each of the stratum sample sizes is set to the value of 1, which is the minimum value allowed.
The sample size can be specified as a count or as a percentage of each stratum population.
Note: Click the Retrieve Population button to refresh and calculate the Expected Margin of Error based on the identified Population size and your overall strata sample sizes.
To extract a sample using categorical stratified sampling based on alphanumeric categories within the data:
The Sampling dialog box opens.
Note that all fields (character and numeric) that you selected for your report are available within the Stratum Field drop-down list.
The example of strata criteria is shown in the following image.
Calculate Sample Size
Note: The value defined in the calculator is used as the default value when new stratum are created. If you want to change the default to be used each time you create a new criteria row, set the default value within the Default Response Distribution field box.
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Select the Specify Sample Size radio button, as shown in the following image.
By default, each of the stratum sample sizes is set to the value of 1, which is the minimum value allowed.
The sample size can be specified as a count or as a percentage of the overall population.
Note: Click the Retrieve Population button to refresh and calculate the Expected Margin of Error based on the identified Population size and your overall strata sample sizes.
To extract a sample using categorical stratified sampling based on alphanumeric categories within the data:
Note that all fields (character and numeric) that you selected for your report are available within the Stratum Field drop-down list, as shown in the following image.
The image below shows that the Plant field was selected to be used to define the stratum criteria.
The example of strata criteria is shown in the following image.
Calculate Sample Size
Note: The value defined in the calculator is used as the default value when new stratum are created. If you want to change the default to be used each time you create a new criteria row, set the default value within the Default Response Distribution field box.
The Recommended Sample Size will be calculated and displayed, as shown in the image below.
Specify Sample Size
Select the Specify Sample Size radio button, as shown in the following image.
By default, each of the stratum sample sizes is set to the value of 1, which is the minimum value allowed.
The sample size can be specified as a count or as a percentage of the overall population.
Note: Click the Retrieve Population button to refresh and calculate the Expected Margin of Error based on the identified Population size and your overall strata sample sizes.
To confirm the number of records included in the sampled extract, you can run the procedure with the Message Viewer on. This provides both the selected output and the messages confirming the sample that was extracted.
In App Studio, select Message Viewer ON from the Run menu within the Application menu, as shown in the following image.
In Developer Studio, select Message Viewer ON from the Run drop-down menu, as shown in the following image.
This provides both the selected output and the messages confirming the sample that was extracted.
The image below shows the output from the random sample defined in How to Extract a Sample Using Random Sampling in Developer Studio.
By default, sampling is set to disabled. To select a sampling technique, change the state of the Sampling radio button.
Important: To remove sampling definitions that you have previously defined, change the Sampling technique back to Disable Sampling. The current sampling definitions are retained in the current procedure (fex), until you save the procedure, but not used during report execution. Once you save a procedure with sampling disabled, any previously defined settings are removed.
WebFOCUS |