Home Page Overview
New Features Downloads & Prices
P-STAT documentation Technical Support
Contact P-STAT Unistat for Windows

TURF Examples

The following examples show the command that produces the TURF output, the TURF report and the REACH.RESULTS file. The TURF commands can be entered manually or generated from the pull down menus. Examples using TURF from the menus can be found in the manual "P-STAT:An Introductory Guide for Windows Users". Download pcintro.zip ( 221KB Sept. 7 2004).

The following is a small input file which is used in the first few examples. The case id will never be used in the analyses. Variable www contains weights and will only be used when the CASE.WEIGHT option is desired.

FILE ddd                            

case                                    
  id   www    v1    v2    v3    v4    v5

9001     1     1     1     0     0     0
9002     1     1     1     0     0     0
9003     1     1     1     0     0     0
9004     1     1     1     0     0     0
9005     1     1     1     0     0     0
9006     1     1     1     0     0     0
9007     1     0     1     0     0     0
9008     1     0     0     1     0     0
9009     1     0     0     1     0     0
9010     1     0     0     1     0     0
9011     1     0     0     1     0     0
9012     1     0     0     0     1     0
9013     1     0     0     0     1     0
9014     1     0     0     0     1     0
9015     3     0     0     0     0     2
9016     3     0     0     0     0     2

A simple analysis with no options

The command which produces the output
        TURF ddd [ DROP case.id www ],
           REACH.RESULTS workr,
           SIZE 3$
The TURF report
     ---------------------------------------------------------
     | TURF analysis for file ddd completed-----------
     | OPTIONS: none                                         |
     |                                                       |
     |        5 items were used in the analysis.             |
     |                                                       |
     |       16 cases were read and used.                    |
     |       16 cases had at least one positive response,    |
     |          making that the maximum possible reach.      |
     |                                                       |
     | SIZE   3 evaluated 10 combinations:                   |
     |       14 was the best REACH, found in 1 combination.  |
     |       14 was the FREQ value in that combination.      |
     |       17 was the best FREQ in any size 3 combination. |
     |                                                       |
     | The FREQ score for a combination is the count         |
     | of the non-zero responses for that combination,       |
     | summed over the reached cases.                        |
     |                                                       |
     | REACH.RESULTS file workr has the 10                   |
     | combinations with the highest reach scores.           |
     | The items are ordered by their REACH contribution.    |
     | Cumulative reach is shown.                            |
     |                                                       |
     | Time: less than 0.1 second.                           |
     ---------------------------------------------------------
The REACH.RESULTS file
     FILE workr
 
 TURF results ordered by REACH, from input file ddd using 5,3
 
                               pct
                                of
                        pct    max        item  item  item
 size  rank  reach  reached  reach  freq  .1    .2    .3
 
    3     1     14    87.50  87.50    14  v2    v3    v4
                                          7     11    14
 
    3     2     13    81.25  81.25    13  v2    v3    v5
                                          7     11    13
 
    3     3     13    81.25  81.25    13  v1    v3    v4
                                          6     10    13
 
    3     4     12    75.00  75.00    12  v1    v3    v5
                                          6     10    12
 
    3     5     12    75.00  75.00    12  v2    v4    v5
                                          7     10    12
 
    3     6     11    68.75  68.75    17  v2    v3    v1
                                          7     11    11
 
    3     7     11    68.75  68.75    11  v1    v4    v5
                                          6     9     11
 
    3     8     10    62.50  62.50    16  v2    v4    v1
                                          7     10    10
 
    3     9      9    56.25  56.25    15  v2    v5    v1
                                          7     9     9
 
    3    10      9    56.25  56.25     9  v3    v4    v5

A TURF analysis with response weights

The command which produces the output
        TURF ddd [ DROP case.id www ],
           RESPONSE.WEIGHTS,
           REACH.RESULTS workrw,
           SIZE 3$
The TURF report
 

     ----------TURF analysis for file ddd completed-----------
     | OPTIONS: response.weights                             |
     |                                                       |
     |        5 items were used in the analysis.             |
     |                                                       |
     |       16 cases were read and used.                    |
     |       16 cases had at least one positive response,    |
     |          making that the maximum possible reach.      |
     |                                                       |
     | SIZE   3 evaluated 10 combinations:                   |
     |       14 was the best REACH, found in 1 combination.  |
     |       14 was the FREQ value in that combination.      |
     |       17 was the best FREQ in any size 3 combination. |
     |                                                       |
     | The FREQ score for a combination is the sum of the    |
     | responses for that combination in the reached cases.  |
     |                                                       |
     | REACH.RESULTS file workrw has the 10                  |
     | combinations with the highest reach scores.           |
     | The items are ordered by their REACH contribution.    |
     | Cumulative reach is shown.                            |
     |                                                       |
     | Time: less than 0.1 second.                           |
     ---------------------------------------------------------
 
The REACH.RESULTS file
    FILE workrw

 TURF results ordered by REACH, from input file ddd using 5,3

                               pct                        
                                of                        
                        pct    max        item  item  item
 size  rank  reach  reached  reach  freq  .1    .2    .3  
 
    3     1     14    87.50  87.50    14  v2    v3    v4  
                                          7     11    14  
 
    3     2     13    81.25  81.25    15  v2    v3    v5  
                                          7     11    13  
 
    3     3     13    81.25  81.25    13  v1    v3    v4  
                                          6     10    13  
 
    3     4     12    75.00  75.00    14  v1    v3    v5  
                                          6     10    12  
 
    3     5     12    75.00  75.00    14  v2    v4    v5  
                                          7     10    12  
 
    3     6     11    68.75  68.75    17  v2    v3    v1  
                                          7     11    11  
 
    3     7     11    68.75  68.75    13  v1    v4    v5  
                                          6     9     11  
 
    3     8     10    62.50  62.50    16  v2    v4    v1  
                                          7     10    10  
 
    3     9      9    56.25  56.25    17  v2    v5    v1  
                                          7     9     9   
 
    3    10      9    56.25  56.25    11  v3    v4    v5  
                                          4     7     9   

A TURF analysis using case weights

The TURF command
        TURF ddd [ DROP case.id  ],
           CASE.WEIGHTS www,
           REACH.RESULTS workcw,
           SIZE 3$
The TURF report
     ------------TURF analysis for file ddd completed-------------
     | OPTIONS: case.weights (in variable www)                   |
     |                                                           |
     |        5 items were used in the analysis.                 |
     |                                                           |
     |       16 cases were read and used; the sum                |
     |          of the weights for these cases was 20.           |
     |                                                           |
     |       16 cases had at least one positive response.        |
     |          The sum of the weights for these cases was 20,   |
     |          making that the maximum possible reach.          |
     |                                                           |
     | SIZE   3 evaluated 10 combinations:                       |
     |       17 was the best REACH, found in 1 combination.      |
     |       17 was the FREQ value in that combination.          |
     |       19 was the best FREQ in any size 3 combination.     |
     |                                                           |
     | The FREQ score for a combination is the count of          |
     | non-zero responses in the case for that combination,      |
     | times the caseweight, summed over the reached cases.      |
     |                                                           |
     | REACH.RESULTS file workcw has the 10                      |
     | combinations with the highest reach scores.               |
     | The items are ordered by their REACH contribution.        |
     | Cumulative reach is shown.                                |
     |                                                           |
     | Time: less than 0.1 second.                               |
     -------------------------------------------------------------
TURF: REACH.RESULTS in a case weight analysis
    FILE workcw,
 
                               pct                        
                                of                        
                        pct    max        item  item  item
 size  rank  reach  reached  reach  freq  .1    .2    .3  
 
    3     1     17       85     85    17  v2    v5    v3  
                                          7     13    17  
 
    3     2     16       80     80    16  v2    v5    v4  
                                          7     13    16  
 
    3     3     16       80     80    16  v1    v5    v3  
                                          6     12    16  
 
    3     4     15       75     75    15  v1    v5    v4  
                                          6     12    15  
 
    3     5     14       70     70    14  v2    v3    v4  
                                          7     11    14  
 
    3     6     13       65     65    19  v2    v5    v1  
                                          7     13    13  
 
    3     7     13       65     65    13  v1    v3    v4  
                                          6     10    13  
 
    3     8     13       65     65    13  v5    v3    v4  
                                          6     10    13  
 
    3     9     11       55     55    17  v2    v3    v1  
                                          7     11    11  
 
    3    10     10       50     50    16  v2    v4    v1  
                                          7     10    10  

A TURF analysis using item weights

The commands to build the file of item weights and the analysis.
        BUILD work1,
           VARS name:c weight;
        v3 2 $
 
        TURF ddd [ DROP case.id www  ],
           ITEM.WEIGHTS work1,
           REACH.RESULTS workiw,
           SIZE 3$
The TURF report
     -----------TURF analysis for file ddd completed-----------
     | OPTIONS: item.weights                                  |
     |                                                        |
     | The ITEM.WEIGHTS were read from file work1.            |
     | One item used a weight that was supplied by that file. |
     |                                                        |
     |        5 items were used in the analysis.              |
     |                                                        |
     |       16 cases were read and used.                     |
     |       16 cases had at least one positive response,     |
     |          making that the maximum possible reach.       |
     |                                                        |
     | SIZE   3 evaluated 10 combinations:                    |
     |       14 was the best REACH, found in 1 combination.   |
     |       18 was the FREQ value in that combination.       |
     |       21 was the best FREQ in any size 3 combination.  |
     |                                                        |
     | The FREQ score for a combination is the sum of item    |
     | weights for non-zero responses in the reached cases.   |
     |                                                        |
     | REACH.RESULTS file workiw has the 10                   |
     | combinations with the highest reach scores.            |
     | The items are ordered by their REACH contribution.     |
     | Cumulative reach is shown.                             |
     |                                                        |
     | Time: less than 0.1 second.                            |
     ----------------------------------------------------------
TURF: Reach results when the analysis uses item weights
     FILE workiw,

 TURF results ordered by REACH, from input file ddd using 5,3
 
                               pct                        
                                of                        
                        pct    max        item  item  item
 size  rank  reach  reached  reach  freq  .1    .2    .3  
 
    3     1     14    87.50  87.50    18  v2    v3    v4  
                                          7     11    14  
 
    3     2     13    81.25  81.25    17  v2    v3    v5  
                                          7     11    13  
 
    3     3     13    81.25  81.25    17  v1    v3    v4  
                                          6     10    13  
 
    3     4     12    75.00  75.00    16  v1    v3    v5  
                                          6     10    12  
 
    3     5     12    75.00  75.00    12  v2    v4    v5  
                                          7     10    12  
 
    3     6     11    68.75  68.75    21  v2    v3    v1  
                                          7     11    11  
 
    3     7     11    68.75  68.75    11  v1    v4    v5  
                                          6     9     11  
 
    3     8     10    62.50  62.50    16  v2    v4    v1  
                                          7     10    10  
 
    3     9      9    56.25  56.25    15  v2    v5    v1  
                                          7     9     9   
 
    3    10      9    56.25  56.25    13  v3    v4    v5  
                                          4     7     9   

A TURF analysis: 4 sizes, OMIT and REACH.DETAILS

The TURF command
 
        TURF ddd [ drop case.id www ],
           SIZES 2 to 5,
           OMIT SIZE RANK PCT.REACHED PCT.OF.MAX.REACH FREQ,
           REACH.RESULTS worko 2,
           REACH.DETAILS NONE $
The TURF report
     ----------TURF analysis for file ddd completed-----------
     | OPTIONS: none                                         |
     |                                                       |
     |        5 items were used in the analysis.             |
     |                                                       |
     |       16 cases were read and used.                    |
     |       16 cases had at least one positive response,    |
     |          making that the maximum possible reach.      |
     |                                                       |
     | SIZE   2 evaluated 10 combinations:                   |
     |       11 was the best REACH, found in 1 combination.  |
     |       11 was the FREQ value in that combination.      |
     |       13 was the best FREQ in any size 2 combination. |
     |                                                       |
     | SIZE   3 evaluated 10 combinations:                   |
     |       14 was the best REACH, found in 1 combination.  |
     |       14 was the FREQ value in that combination.      |
     |       17 was the best FREQ in any size 3 combination. |
     |                                                       |
     | SIZE   4 evaluated 5 combinations:                    |
     |       16 was the best REACH, found in 1 combination.  |
     |       16 was the FREQ value in that combination.      |
     |       20 was the best FREQ in any size 4 combination. |
     |                                                       |
     | SIZE   5 evaluated 1 combination:                     |
     |       16 was the best REACH, found in 1 combination.  |
     |       22 was the FREQ value in that combination.      |
     |                                                       |
     | The FREQ score for a combination is the count         |
     | of the non-zero responses for that combination,       |
     | summed over the reached cases.                        |
     |                                                       |
     | REACH.RESULTS file worko has the 7 combinations       |
     | with the best reach scores from the 4 sizes.          |
     | The items are ordered by their REACH contribution.    |
     |                                                       |
     | Time: less than 0.1 second.                           |
     ---------------------------------------------------------
The REACH.RESULTS file
     FILE worko           

 TURF results ordered by REACH, from input file ddd showing 4 sizes.    PAGE 1

        item  item  item  item  item
 reach  .1    .2    .3    .4    .5

    11  v2    v3          
    10  v1    v3          
    14  v2    v3    v4    
    13  v2    v3    v5    
    16  v2    v3    v4    v5
    15  v1    v3    v4    v5
    16  v2    v3    v4    v5    v1

Using labels to make the output more meaningful

The labels file should have a label provided for each variable in the input file associated with each of the possible items.
      SAVE.LABELS ddd.lab;
      ('v1') 'Peach'
      ('v2') 'Apple'
      ('v3') 'Cherry'
      ('v4') 'Strawberry'
      ('v5')  'Vanilla' /
      item.2 @ /
      item.3 @ /
      item.4 @ /
      item.5 @ /
      $
The SUBSTITUTE.VL command is used to create a new P-STAT system file with labels substituted for the input values. The labels can be up to 78 characters long.
 
      SUBSTITUTE.VL worko,
      VARIABLES item.1 to item.5,
      LABELS ddd.lab,
      OUT worko $

 File worko after substituting value labels    PAGE 1

        item   item    item        item     item
 reach  .1     .2      .3          .4       .5

    11  Apple  Cherry
    10  Peach  Cherry
    14  Apple  Cherry  Strawberry
    13  Apple  Cherry  Vanilla
    16  Apple  Cherry  Strawberry  Vanilla
    15  Peach  Cherry  Strawberry  Vanilla
    16  Apple  Cherry  Strawberry  Vanilla  Peach

Examples using a bigger file: 550 cases and 29 variables

        TURF p0301x,
           SIZES 6 to 4,
           OMIT SIZE RANK PCT.REACHED PCT.OF.MAX.REACH FREQ,
           REACH.RESULTS emit.ex1 2,
           REACH.DETAILS NONE $
 
     ----------TURF analysis for file p0301x completed----------
     | OPTIONS: none                                           |
     |                                                         |
     |       29 items were used in the analysis.               |
     |                                                         |
     |      550 cases were read and used.                      |
     |      213 cases had at least one positive response,      |
     |          making that the maximum possible reach.        |
     |                                                         |
     | SIZE   6 evaluated 475,020 combinations:                |
     |      213 was the best REACH, found in 264 combinations. |
     |      933 was the best FREQ in those 264 combinations.   |
     |    1,003 was the best FREQ in any size 6 combination.   |
     |                                                         |
     | SIZE   5 evaluated 118,755 combinations:                |
     |      213 was the best REACH, found in 12 combinations.  |
     |      746 was the best FREQ in those 12 combinations.    |
     |      867 was the best FREQ in any size 5 combination.   |
     |                                                         |
     | SIZE   4 evaluated 23,751 combinations:                 |
     |      212 was the best REACH, found in 2 combinations.   |
     |      628 was the best FREQ in those 2 combinations.     |
     |      729 was the best FREQ in any size 4 combination.   |
     |                                                         |
     | The FREQ score for a combination is the count           |
     | of the non-zero responses for that combination,         |
     | summed over the reached cases.                          |
     |                                                         |
     | REACH.RESULTS file omit.ex1 has the 6 best reach        |
     | combinations, 2 per size for each of 3 sizes.           |
     | The items are ordered by their REACH contribution.      |
     |                                                         |
     | Time: .3 seconds.                                      |
     -----------------------------------------------------------
The REACH.RESULTS file
     FILE omit.ex1

 TURF results ordered by REACH, from input file p0301x showing 3 sizes.


        item  item  item  item   item   item 
 reach  .1    .2    .3    .4     .5     .6   
 
   213  VAR2  VAR3  VAR4  VAR5   VAR23  VAR13
   213  VAR2  VAR3  VAR4  VAR5   VAR23  VAR15
   213  VAR3  VAR4  VAR5  VAR23  VAR13       
   213  VAR3  VAR4  VAR5  VAR23  VAR15       
   212  VAR3  VAR4  VAR5  VAR23              
   212  VAR3  VAR4  VAR5  VAR28              

TURF: SIZES, OMIT and all reach.details

        TURF p0301x,
           SIZES 3 5 7,
           OMIT SIZE  PCT.OF.MAX.REACH FREQ,
           REACH.RESULTS omit.ex2 2,
           REACH.DETAILS ALL $
The TURF report
 
     -----------TURF analysis for file p0301x completed-----------
     | OPTIONS: none                                             |
     |                                                           |
     |       29 items were used in the analysis.                 |
     |                                                           |
     |      550 cases were read and used.                        |
     |      213 cases had at least one positive response,        |
     |          making that the maximum possible reach.          |
     |                                                           |
     | SIZE   3 evaluated 3,654 combinations:                    |
     |      210 was the best REACH, found in 3 combinations.     |
     |      542 was the best FREQ in those 3 combinations.       |
     |      551 was the best FREQ in any size 3 combination.     |
     |                                                           |
     | SIZE   5 evaluated 118,755 combinations:                  |
     |      213 was the best REACH, found in 12 combinations.    |
     |      746 was the best FREQ in those 12 combinations.      |
     |      867 was the best FREQ in any size 5 combination.     |
     |                                                           |
     | SIZE   7 evaluated 1,560,780 combinations:                |
     |      213 was the best REACH, found in 2,755 combinations. |
     |    1,071 was the best FREQ in those 2,755 combinations.   |
     |    1,137 was the best FREQ in any size 7 combination.     |
     |                                                           |
     | The FREQ score for a combination is the count             |
     | of the non-zero responses for that combination,           |
     | summed over the reached cases.                            |
     |                                                           |
     | REACH.RESULTS file omit.ex2 has the 6 best reach          |
     | combinations, 2 per size for each of 3 sizes.             |
     | The items are ordered by their REACH contribution.        |
     |                                                           |
     | Four reach.details lines were included:                   |
     |   1 cumulative reach.                                     |
     |   2 additional reach for each separate item.              |
     |   3 cumulative percent of cases reached.                  |
     |   4 additional percent of cases reached by                |
     |     each separate item.                                   |
     |                                                           |
     | Time: 7 seconds.                                       |
     -------------------------------------------------------------
The REACH.RESULTS file
 
                  pct  item    item    item    item    item    item    item  
 rank  reach  reached  .1      .2      .3      .4      .5      .6      .7    
 
    1    210   38.182  VAR3    VAR4    VAR5                                  
                       186     208     210                                   
                       186     22      2                                     
                       33.82%  37.82%  38.18%                                
                       33.82%  4.00%   0.36%                                 
 
    2    210   38.182  VAR3    VAR4    VAR23                                 
                       186     208     210                                   
                       186     22      2                                     
                       33.82%  37.82%  38.18%                                
                       33.82%  4.00%   0.36%                                 
 
    1    213   38.727  VAR3    VAR4    VAR5    VAR23   VAR13                 
                       186     208     210     212     213                   
                       186     22      2       2       1                     
                       33.82%  37.82%  38.18%  38.55%  38.73%                
                       33.82%  4.00%   0.36%   0.36%   0.18%                 
 
    2    213   38.727  VAR3    VAR4    VAR5    VAR23   VAR15                 
                       186     208     210     212     213                   
                       186     22      2       2       1                     
                       33.82%  37.82%  38.18%  38.55%  38.73%                
                       33.82%  4.00%   0.36%   0.36%   0.18%                 
 
    1    213   38.727  VAR2    VAR3    VAR4    VAR5    VAR23   VAR13   VAR11 
                       187     199     208     210     212     213     213   
                       187     12      9       2       2       1       0     
                       34.00%  36.18%  37.82%  38.18%  38.55%  38.73%  38.73%
                       34.00%  2.18%   1.64%   0.36%   0.36%   0.18%   0.00% 
 
    2    213   38.727  VAR2    VAR3    VAR4    VAR5    VAR23   VAR13   VAR17 
                       187     199     208     210     212     213     213   
                       187     12      9       2       2       1       0     
                       34.00%  36.18%  37.82%  38.18%  38.55%  38.73%  38.73%
                       34.00%  2.18%   1.64%   0.36%   0.36%   0.18%   0.00%