Accumulating Subtotals Results in Spreadsheets


To produce subtotal results in spreadsheets covering all or several years,

(a) you must include the Subtotal Command file statements in your CMFSTART files.

(b) you must select option Accumulate Subtotal Results.

(c) you must ensure that there are the same subtotals results in the runs which are compared when cumulative difference results are calculated.

The subtotal results will be shown in the spreadsheets covering All / Several Years on the Results page.

Example

Suppose that you want two subtotals results reported for the Base Case, one covering one group of shocks and the other covering all the remaining shocks.

You could include appropriate subtotals statements in your CMFSTARTB (the CMFSTART file for the Base Case). These subtotals statements would have the form

Subtotal <list1> = subtotal 1 ; ! <list1> is the list of shocked variables for subtotal 1

Subtotal <list2> = subtotal 2 ;

See chapter 11 of GPD-3 for more details about subtotals statements in Command files.

Then select Option Accumulate Subtotal Results.

If you then run the Base Case and select, on the Results page, the Year-on-Year style you would get a spreadsheet similar to the table below. Rows marked sub%1 refer to the first subtotal, while rows marked %2 refer to the second subtotal. The total result is shown first followed by the subtotal results.

 

Year-on-Year Output

Solution

1998

1999

2000

2001

Arith Total

Geom Total

Average

c1

22.0

13.0

14.0

26.0

75.0

75.0

18.75

sub%1 c1

10.0

6.0

5.0

10.0

 

 

 

sub%2 c1

12.0

7.0

9.0

16.0

 

 

 

p1

2.0

1.0

1.0

2.1

6.1

6.23

1.52

sub%1 p1

1.0

0.4

0.3

1.0

 

 

 

sub%2 p1

1.0

0.6

0.7

1.1

 

 

 

Note that the subtotals results for either c1 or p1 for any year add to the overall result (as they should since the two subtotals results cover all the shocks).

If you select, on the Results page, the Cumulative style, the cumulative output would be (approximately)

 

Cumulative Output

Solution

1998

1999

2000

2001

Av Annual

c1

22.0

35.0

49.0

75.0

18.75

sub%1 c1

10.0

16.0

21.0

31.0

 

sub%2 c1

12.0

19.0

28.0

44.0

 

p1

2.0

3.02

4.05

6.235

1.523

sub%1 p1

1.0

1.408

1.717

2.757

 

sub%2 p1

1.0

1.612

2.333

3.477

 

Again note that the subtotals numbers add to the overall number in each case. [For example, for year 2000, the subtotals numbers for p1 are 1.717 and 2.333 which add to 4.05 the accumulated result for p1 shown in 2000.]

See section 10.2.4 in GEMPACK document GPD-4 for further details about how the cumulative subtotals are calculated.



URL of this topic: www.copsmodels.com/webhelp/rundynam/hc_accumsubtot.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage