Home Page Turf Overview
Turf Examples Turf Options
Turf Results Turf Files
Turf Methods Turf Limitations

TURF.TIMINGS

This helpfile describes the factors that determine how long a TURF command will take to run. This section was last updated on Sept 16, 2006.

Processing speed: cases and combinations

There are three components whose effect on the speed of a TURF run is more or less linear:

  1. more cases. Twice the cases for the same analysis will take twice the time.

  2. more combinations to be tested. 30 items taken 6 at a time (ie, 30,6) has 593,775 combinations, 30,7 has 2,035,800. That is 3.4 times as many combinations. Therefore, it will take 3.4 times longer to run.

  3. CPU speed. Since the data and the results are held within memory during a run, going from an 800 mHz chip to a 2.4 GHz chip should be about 3 times faster.

Processing speed: effects of various options

TURF speed is also greatly affected by the options chosen. The fastest run is one that uses none of the options: for example, TURF INFILE, SIZE 6, REACH.RESULTS OUTFILE $.

If this takes one second, how much longer do the various options take ?

  1. 10 seconds if adding just CASE WEIGHTING.

  2. 28 seconds if using response weighting, item weighting or reach threshold (with or without case weighting).

Processing speed: output files

The various output files take very little extra time.

A 29,7 run for 500 cases with no output files took 2.5 seconds. Adding the default sized (best 100) REACH.RESULTS or FREQ.RESULTS files made the runtime 2.7 seconds; doing both took 2.8 seconds.

Asking for the 20,000 best REACH.RESULTS results instead of the default best 100 took 3.1 seconds instead of 2.7.

The REACH.SUMMARY and FREQ.SUMMARY output files take a little more time than the REACH.RESULTS and FREQ.RESULTS files. The FULL.OUTPUT file takes almost no extra time since there is no sort management involved.


TURF.SCORES

        TURF.SCORES xin, template ttt,                      out xout $
        TURF.SCORES xin, items v2 v4 to v8, carry case.num, out xout $

TURF.SCORES computes the REACH score on a specified combination of items for each case of an input file. These scores are written to an output file. The calculations are identical to those in the TURF command.

The output file will have the items used in the scoring, the reach score, and any "carried" variables. Carried variables are usually variables that identify the individual cases, facilitating demographic breakdowns of the reached cases.

The command must be given the names of the variables (items) them make up the combination to be scored. In addition, the defaults can be changed for various options. These are: case weighting, item weighting, response weighting and the response threshold.

This information can be supplied in 2 ways:

  1. by providing a TEMPLATE file (created in a TURF command).
  2. by providing the controls as part of this command.

Identifiers when using a TEMPLATE file

TURF.SCORES file
this supplies the input data file. Required.
TEMPLATE file
this is a file, created in a TURF run, that contains the settings that were used, and the names of the items that made up the best combination. Required.
OUT file
name for the result file. Required.
CARRY vars
variables that should be carried over from the input file to the OUT file, even though they are not involved in the execution of the command. Optional.

Identifiers when NOT using a TEMPLATE file

TURF.SCORES file
this supplies the input data file. Required.
ITEMS vars
names of the variables (items) that make up the combination to be scored. Ranges can be used: var2 to var5. Required.
ITEM.WEIGHTS numbers
weights of the items. The default is to treat all items the same, i.e., with weights of 1. Optional.
CASE.WEIGHTS var
name of a variable to be used for case weighting when computing the overall reach for the dataset. Optional.
RESPONSE.WEIGHTS
causes the actual values of the items to be used in the scoring instead of just zero/one. Optional.
REACH.THRESHOLD number
default one. the value that a case must achieve to be 'reached'. Optional.
OUT file
name for the result file. Required.
CARRY vars
variables that should be carried over from the input file to the OUT file, even though they are not involved in the execution of the command. Optional.

Contents of the OUT file

The OUT file will have the following variables: the items in the combination that was scored, the caseweight variable (if there was one), and any CARRY variables that were requested.

In addition, two variables are added:

  1. REACH.SCORE, the score of each case for the combination. This is set to M1 if there are negative or missing values for the case in the combination items. It is also M1 if the case has a non-positive caseweight.
  2. REACH.CATEGORY, was the case reached, given its score and the threshold in use ? It is M1 when reach.score is M1. It is zero when reach.score is less than the threshold. It is one when reach.score satisfies the threshold.

An example

The TURF documentation shows a 16 case file named ddd. The following command reads that file and computes reach scores using items v1, v2 and v5. The response.weights option is selected, and a threshold of 2 is used. Variable case.id is carried across into out file sss.

        turf.scores ddd, items v1 v2 v5,
                         response.weights,
                         reach.threshold 2,
                         carry case.id,
                         out sss $

              *******************************
              *  the report produced by     *
              *  running the above command  *
              *******************************

        --------------TURF.SCORES completed--------------
        | The reach scoring was done using these items: |
        | v1                v2                v5        |
        |                                               |
        | 16 cases were read from file ddd.             |
        | The reach.threshold was 2.                    |
        | The threshold was met by 8 cases.             |
        | The RESPONSE.WEIGHTS option was in use.       |
        | 6 variables were written to file sss.         |
        -------------------------------------------------
.
              *********************************
              *  the output file produced by  *
              *  running the above command    *
              *********************************

        case                    reach     reach
          id    v1    v2    v5  score  category

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