Using fixed set sizes for closure analysis


Usually the set statements in your TAB file look like this:

Set COM # Commodities# read elements from file BASEDATA header COM;

That is, neither the size nor the membership of the set COM is known at the time that TABmate performs closure analysis.

Sometimes the closure analysis is more useful if set sizes can be deduced from the TAB file. This might be because:

you wish to impress people by stating how many variables and equations your model has.

to surmount computer limitations (or GEMPACK licence size limits) you need to know the sizes of variables and equations.

you have a puzzling closure problem.

In such cases it may be useful to temporarily alter your sets statement so they look like this:

Set COM # Commodities # size 37;

or even, perhaps, like this:

Set COM # Commodities # size 37 read elements from file BASEDATA header COM;

Knowing the size of sets allows TABmate to verify cases where 2 or more equations explain one variable:

Following variables are possibly matched to one or more equations:

Variable Size Equation Size

p0 COM*SRC E_p0A COM

E_p0B COM

Total Size 74 Total Size 74

In the above fragment from the closure report file, the last line only appears if set sizes are known.

Sometimes we have two sets in the model which are identical (or, at least, have a 1-to-1 relationship). For example, we might distinguish sets COM and IND even when these sets have identical elements. We might have an IND variable explained by a COM equation. If set sizes were not specified in the TAB file, section 1 of the closure report would then flag an apparent error, like this:

Variable Size Equation Size

x1tot IND E_x1tot COM Size!?

But if set sizes were specified in the TAB file, the above line of the closure report would instead appear as:

Variable Size Equation Size

x1tot IND E_x1tot COM Both size 37

Again, if set sizes are known, the table Tally of Variables and Equations, which sometimes appears at the end of the CLO file, will tell you how many individual variables and equations the model contains.

The size specified in temporary set statements like:

Set REG # Regions # size 10;

Set HOU # Household types # size 10;

does not (during the closure analysis stage) have to be the same as the actual set size on your data file. It can be advantageous to choose other set sizes. For example, with 10 regions and 10 households, TABmate would allow us to explain a HOU variable with a REG equation. This would be a very bad logical error! Instead you should try:

Set REG # Regions # size 7;

Set HOU # Household types # size 11;

If you make each set size a unique prime number, you can avoid such logical errors. [Note that products of unique primes will also be unique. This avoids the possibility that size(COM*HOU) = size(REG*OCC)]

You would change your set statements back to the original form after you finished doing closure analysis.

See also:

Tools..Closure command

The Closure report file

Tally of Variables and Equations



URL of this topic: www.copsmodels.com/webhelp/tabmate/hc_setsize.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage