# Table Computations - Add Rows to Display Effective Column n

This rule computes an estimate of Effective Column n for each column and displays it on the table. Where the cells in the column have different values of Column n, a range is shown (see the example).

## Technical details

Effective Column n is computed using:

Effective Column n = Column n / Base n * Effective Base n

Where the Effective Column n is the same within the cells of each column, the table will gain a single row at the bottom that gives the result for each column. When the statistic varies within the columns of the table, then the table will gain two extra rows, one for the minimum value of the Effective Column n, and one for the maximum value. Where the table cannot display the Column n within the Statistics - Cells, the calculation instead uses the values of the Column n for each column from the Statistics - Below.

It may be necessary to turn off the % signs in your table to make the best use of this script. This is because the script displays the Effective Base n in a statistic that is already selected in the Statistics - Cells. The script will try to use a non-% statistic (e.g. n or Column n) to display the Effective Column n, but will choose a % statistic (eg % or Column %) if no non-% statistics are selected on the table.

The Effective Column n will not necessarily 'add up' unless:

1. Weights and significance is set to Kish's approximation or a specific value, and
2. There is no missing data.

## How to apply this rule

### For the first time in a project

• Select the table(s)/chart(s) that you wish to apply the rule to.
• Start typing the name of the Rule into the Search features and data box in the top right of the Q window.
• Click on the Rule when it appears in the QScripts and Rules section of the search results.

OR

• Select Automate > Browse Online Library.
• Choose this rule from the list.

### Additional applications of the rule

• Select a table or chart that has the rule and any table(s)/chart(s) that you wish to apply the rule to.
• Click on the Rules tab (bottom-left of the table/chart).
• Select the rule that you wish to apply.
• Click on the Apply drop-down and choose your desired option.
• Check New items to have it automatically applied to new items that you create. Use Edit > Project Options > Save as Template to create a new project template that automatically uses this rule.

## Removing the rule

• Select the table(s)/chart(s) that you wish to remove the rule from.
• Press the Rules tab (bottom-right corner).
• Press Apply next to the rule you wish to remove and choose the appropriate option.

## How to modify the rule

• Click on the Rules tab (bottom-left of the table/chart).
• Select the rule that you wish to modify.
• Click Edit Rule and make the desired changes. Alternatively, you can use the JavaScript below to make your own rule (see Customizing Rules).

## JavaScript

includeWeb('QScript Utility Functions');
includeWeb('Table JavaScript Functions for Adding Calculations')