MPSGE:Closed Economy Models. Solution to Model M1_8S

Closed Economy Models: Solution to Model M1_8S

Josefina Martinez
Department of Economics
University of Colorado

$TITLE  Model M1_8S: Closed 2x2 Economy --  Stone Geary (LES) Preferences

$ontext
	The benchmark data is identical to problem M1_1:

		  Production Sectors          Consumers
   Markets   |    X       Y        W    |       CONS
   ------------------------------------------------------
	PX   |  100             -100    |
	PY   |          100     -100    |
	PW   |                   200    |       -200
	PL   |  -40     -60             |        100
	PK   |  -60     -40             |        100
   ------------------------------------------------------

	We want to produce a benchmark in which the income elasticity
	of demand for X equals 0.75.
$offtext

*       Declare GAMS parameters which we will use in model
*       specification.  XBAR will be used in exercise (1) and
*       SIGMA in exercise (3).

SCALAR ENDOW  Economy factor endowment index /1/
       XBAR   Minimum consumption level /40/
       SIGMA  Elasticity of substitution /1/;

$ONTEXT

$MODEL:M1_8S

$SECTORS:
	X       ! Activity level for sector X
	Y       ! Activity level for sector Y
	W       ! Activity level for sector W (Hicksian welfare index)

$COMMODITIES:
	PX      ! Price index for commodity X
	PY      ! Price index for commodity Y
	PL      ! Price index for primary factor L
	PK      ! Price index for primary factor K
	PW      ! Price index for welfare (expenditure function)

$CONSUMERS:
	CONS    ! Income level for consumer CONS

$PROD:X s:1
	O:PX    Q:100
	I:PL    Q: 40
	I:PK    Q: 60

$PROD:Y s:1
	O:PY    Q:100
	I:PL    Q: 60
	I:PK    Q: 40

$PROD:W s:SIGMA
	O:PW    Q:160
	I:PX    Q: 60
	I:PY    Q:100

$DEMAND:CONS
	D:PW    Q:160
	E:PL    Q:(100*ENDOW)
	E:PK    Q:(100*ENDOW)
	E:PX    Q:(-XBAR)

$OFFTEXT

$SYSINCLUDE mpsgeset M1_8S

*       Benchmark replication:

	M1_8S.ITERLIM = 0;
$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;
	
	M1_8S.ITERLIM = 2000;
*       Counterfactual: double the factor endowment.

	ENDOW = 2;

$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;


*------------------------------------------------------------------------
*       EXERCISE (1).   Modify the program to read the income
*       elasticity of demand for good X. --The program was modified 
*       in the $DEMAND:CONS block with XBAR in the Q:field associated 
*       with PX.

*       Compute the subsistence demand and automatically calibrate 
*       the model.

$ontext
	Begin with a utility function of the form:

		U(X,Y) = a ln(X - X*) + (1-a) ln(Y)             

		where X* is a "minimum consumption level"

	Demand function for X is given by:

			   a (I - PX X*)
		X = X*  +  ------------- 
				PX
		in which I is income and PX is the price of X.  
	
	The income share of good X is then:

		PX X      (a I + (1-a) PX X*) 
		----   =  --------------------  ,
		  I                I

	and the income elasticity of demand is given by:

		 I    d X            a I
		---   ---   =   -----------------  .
		 X    d I       a I + (1-a) PX X*

	Knowing the share from the data and the chosen income 
	elasticity, we can solve for X*/I (with PX=1).  This level 
	of X* is then specified as a negative endowment for the 
	consumer, and (X - X*) is the value used in specifying the 
	utility function.

	The income elasticity of demand (IES) can be written as follows:

		IES = a * (1/Sharex)
	
	Solve for a:
		
		a = IES * Sharex

	Then the minimum consumption level of X is:

		X* = I * (Sharex - a) / (1-a)

	Or substituting the expression for a:

		X* = I * (Sharex - IES*Sharex) / (1 - IES*Sharex)                

$offtext

PARAMETER       IES     Income elasticity of demand of good X
		I       Total Consumer Income 
		X0      Supply of good X at benchmark 
		Sharex  Income share of good X
		a       Value share of (X - X*) in consumption
		CIES    Calibrated income elasticity of demand;

*       The value of the parameters at benchmark is:

IES    = 0.75;
I      = 200;
X0     = 100;
ENDOW  = 1;

*       Compute the minimum consumption of X (XBAR):

Sharex = X0/I;
a      = IES * Sharex;
XBAR   = I * (Sharex - a) / (1-a);
DISPLAY "Minimum Consumption --Cobb Douglas utility function", XBAR;

$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;

*       Check the income elasticity of demand -- where I is the level
*       of the variable CONS plus the value of the minimum consumption. 
*       (XBAR is specified as a negative endowment):

CIES("TEST", "I=200")   =  a * (CONS.L + PX.L*XBAR) / 
			  (a * (CONS.L + PX.L*XBAR) + (1 - a) * PX.L*XBAR);  
		
DISPLAY CIES;


*------------------------------------------------------------------------
*       EXERCISE (2).  Generate a sequence of equilibria and measure the 
*       income elasticity of demand for good X over the range of income 
*       from 1 to 10 times the benchmark level.

SET             SC              Scenarios /SC1*SC5/

PARAMETER       ENDVAL(SC)      Labor endowment multiplier by scenario
				/SC1 1, SC2 3, SC3 5, SC4 8, SC5 10/;

LOOP(SC,

*       Install an endowment multiplier for the current scenario:
	
	ENDOW = ENDVAL(SC)

$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;

*       Extract solution values to compute income elasticity of demand:

CIES(SC, "SIGMA=1") = a * (CONS.L + PX.L*XBAR) / 
		     (a * (CONS.L + PX.L*XBAR) + (1 - a) * PX.L*XBAR);  
);
		
DISPLAY CIES;
		

*------------------------------------------------------------------------
*       EXERCISE (3).  Replace the Cobb-Douglas utility function by a
*       general CES utility function with elasticity of substitution
*       SIGMA.  Determine the subsistence demand which is consistent 
*       with a given income elasticity of demand for X.  Generate plots
*       of the income elasticity of demand for good X to compare with
*       results from question (2), taking SIGMA = 0.5 and SIGMA = 2.0.

$ontext
	The CES utility function can be written as:

		U(X,Y) = (a * (X - XBAR)**p + (1-a) * Y**p)**1/p             

		where XBAR is a "minimum consumption level"

	Demand function for X is given by:

		     a**S  *  (I - PX * XBAR)
	X = XBAR  + ------   ---------------------------------------- 
		     PX**S    a**S * PX**(1-S) + (1-a)**S * PY**(1-S)
		
	in which S is the elasticity of substitution, I is income, PX 
	is the price of X and PY is the price of Y.   
	
	Let PX=PY=1, then the demand function can be written as:

			a**S         
        X = XBAR  +  ----------------- * (I - XBAR)
		    a**S + (1-a)**S

	Let's denote (a**S/(a**S + (1-a)**S)) = k.  The income share of 
	good X (with PX=PY=1) is then:

                  X       XBAR + k * (I - XBAR) 
                 ---   =  ---------------------  ,
		  I                I

	and the income elasticity of demand is given by:

                 I    d X        k * I
         IES =  ---   ---   =   ---------------------  .
                 X    d I       XBAR + k * (I - XBAR) 

        Solve for k from the expression of IES:

                k = IES * Sharex 

	Knowing the share from the data and the chosen income 
        elasticity, the minimum consumption of x is:

		XBAR = I * (Sharex - k) / (1 - k)

        Or substitute the expression for k:

		XBAR = I * Sharex (1- IES) / (1 - IES*Sharex)                
	 
	which is the same formulae for XBAR with Cobb-Douglas 
	utility function.  Hence, for a given value of the income 
	elasticity of demand (e.g. 0.75) the value of XBAR is the 
        same, regardless of the value of SIGMA.

$offtext

*------------
SIGMA = 0.5;

*       Compute XBAR, where Sharex and IES as above defined:
PARAMETER       k;

k      = IES * Sharex;
XBAR   = I * (Sharex - k) / (1 - k);
DISPLAY "Minimum Consumption --CES function, SIGMA = 0.5", XBAR;

LOOP(SC,

*       Install an endowment multiplier for the current scenario:
	
	ENDOW = ENDVAL(SC)

$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;

*       Extract solution values to compute income elasticity of demand:

CIES(SC, "SIGMA=0.5") = k * (CONS.L + PX.L*XBAR) / 
                       (k * (CONS.L + PX.L*XBAR) + (1 - k) * PX.L*XBAR);  
     
);

*------------
SIGMA = 2.0;

*       Compute XBAR, where Sharex and IES as above defined:

k      = IES * Sharex;
XBAR   = I * (Sharex - k) / (1-k);
DISPLAY "Minimum Consumption --CES function, SIGMA = 2", XBAR;

LOOP(SC,

*       Install an endowment multiplier for the current scenario:
	
	ENDOW = ENDVAL(SC)

$INCLUDE M1_8S.GEN
	SOLVE M1_8S USING MCP;

*       Extract solution values to compute income elasticity of demand:

CIES(SC, "SIGMA=2") = k * (CONS.L + PX.L*XBAR) / 
                       (k * (CONS.L + PX.L*XBAR) + (1 - k) * PX.L*XBAR);  
);
		
DISPLAY CIES;


The solution listing appears as follows:

               S O L V E      S U M M A R Y

     MODEL   M1_8S               

 Default price normalization using income for CONS

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.000     +INF       .         
---- VAR PY              .        1.000     +INF       .         
---- VAR PL              .        1.000     +INF       .         
---- VAR PK              .        1.000     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      160.000     +INF       .         

  X           Activity level for sector X
  Y           Activity level for sector Y
  W           Activity level for sector W (Hicksian welfare index)
  PX          Price index for commodity X
  PY          Price index for commodity Y
  PL          Price index for primary factor L
  PK          Price index for primary factor K
  PW          Price index for welfare (expenditure function)
  CONS        Income level for consumer CONS

Counterfactual model: Double the Factor Endowment

               S O L V E      S U M M A R Y

     MODEL   M1_8S               

 Default price normalization using income for CONS

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.758     +INF       .         
---- VAR Y               .        2.241     +INF       .         
---- VAR W               .        2.249     +INF       .         
---- VAR PX              .        0.994     +INF       .         
---- VAR PY              .        1.004     +INF       .         
---- VAR PL              .        1.025     +INF       .         
---- VAR PK              .        0.974     +INF       .         
---- VAR PW              .        1.000     +INF       .         
---- VAR CONS            .      360.000     +INF       .         

EXERCISE (1). Automatically Calibrate the model

 E x e c u t i o n

----    509 Minimum Consumption --Cobb Douglas Utility Function

----    509 PARAMETER XBAR                 =       40.000 Minimum consumption 
                                                          level


               S O L V E      S U M M A R Y

     MODEL   M1_8S               

 Default price normalization using income for CONS

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.001     +INF       .         
---- VAR PY              .        1.001     +INF       .         
---- VAR PL              .        1.001     +INF       .         
---- VAR PK              .        1.001     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .      160.118     +INF       .         

E x e c u t i o n

----    622 PARAMETER CIES          Calibrated income elasticity of demand

           I=200

TEST       0.750

EXERCISE (2). Measure the Income Elasticity of Demand for good X over a range of Income

ENDOW = 1

               L O O P S         SC         SC1       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.001     +INF       .         
---- VAR PY              .        1.001     +INF       .         
---- VAR PL              .        1.001     +INF       .         
---- VAR PK              .        1.001     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .      160.118     +INF       .

ENDOW = 3
               L O O P S         SC         SC2       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        2.516     +INF       .         
---- VAR Y               .        3.480     +INF       .         
---- VAR W               .        3.498     +INF       .         
---- VAR PX              .        0.993     +INF       .         
---- VAR PY              .        1.006     +INF       .         
---- VAR PL              .        1.034     +INF       .         
---- VAR PK              .        0.967     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .      560.414     +INF       .         

ENDOW = 5
               L O O P S         SC         SC3       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        4.033     +INF       .         
---- VAR Y               .        5.959     +INF       .         
---- VAR W               .        5.995     +INF       .         
---- VAR PX              .        0.991     +INF       .         
---- VAR PY              .        1.007     +INF       .         
---- VAR PL              .        1.040     +INF       .         
---- VAR PK              .        0.960     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .      960.504     +INF       .         

ENDOW = 8
               L O O P S         SC         SC4       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        6.309     +INF       .         
---- VAR Y               .        9.677     +INF       .         
---- VAR W               .        9.740     +INF       .         
---- VAR PX              .        0.990     +INF       .         
---- VAR PY              .        1.008     +INF       .         
---- VAR PL              .        1.044     +INF       .         
---- VAR PK              .        0.956     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .     1560.599     +INF       .         

ENDOW = 10
               L O O P S         SC         SC5       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        7.826     +INF       .         
---- VAR Y               .       12.155     +INF       .         
---- VAR W               .       12.237     +INF       .         
---- VAR PX              .        0.990     +INF       .         
---- VAR PY              .        1.008     +INF       .         
---- VAR PL              .        1.045     +INF       .         
---- VAR PK              .        0.955     +INF       .         
---- VAR PW              .        1.001     +INF       .         
---- VAR CONS            .     1960.653     +INF       .         

E x e c u t i o n

----    751 PARAMETER CIES          Calibrated income elasticity of demand

           I=200     SIGMA=1

TEST       0.750
SC1                    0.750
SC2                    0.901
SC3                    0.938
SC4                    0.960
SC5                    0.968

EXERCISE (3). CES Utility Function -- SIGMA = 0.5

ENDOW = 1

E x e c u t i o n

----    796 Minimum Consumption --CES function, SIGMA = 0.5

----    796 PARAMETER XBAR                 =       40.000 Minimum consumption 
                                                          level


               L O O P S         SC         SC1       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.003     +INF       .         
---- VAR PY              .        1.003     +INF       .         
---- VAR PL              .        1.003     +INF       .         
---- VAR PK              .        1.003     +INF       .         
---- VAR PW              .        1.003     +INF       .         
---- VAR CONS            .      160.420     +INF       .         

ENDOW = 3
               L O O P S         SC         SC2       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        2.508     +INF       .         
---- VAR Y               .        3.489     +INF       .         
---- VAR W               .        3.498     +INF       .         
---- VAR PX              .        0.995     +INF       .         
---- VAR PY              .        1.008     +INF       .         
---- VAR PL              .        1.036     +INF       .         
---- VAR PK              .        0.968     +INF       .         
---- VAR PW              .        1.003     +INF       .         
---- VAR CONS            .      561.470     +INF       .         

ENDOW = 5
               L O O P S         SC         SC3       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        4.015     +INF       .         
---- VAR Y               .        5.977     +INF       .         
---- VAR W               .        5.995     +INF       .         
---- VAR PX              .        0.993     +INF       .         
---- VAR PY              .        1.009     +INF       .         
---- VAR PL              .        1.043     +INF       .         
---- VAR PK              .        0.961     +INF       .         
---- VAR PW              .        1.003     +INF       .         
---- VAR CONS            .      962.309     +INF       .         

ENDOW = 8
               L O O P S         SC         SC4       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        6.277     +INF       .         
---- VAR Y               .        9.708     +INF       .         
---- VAR W               .        9.740     +INF       .         
---- VAR PX              .        0.992     +INF       .         
---- VAR PY              .        1.010     +INF       .         
---- VAR PL              .        1.047     +INF       .         
---- VAR PK              .        0.957     +INF       .         
---- VAR PW              .        1.003     +INF       .         
---- VAR CONS            .     1563.528     +INF       .         

ENDOW = 10
               L O O P S         SC         SC5       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        7.785     +INF       .         
---- VAR Y               .       12.195     +INF       .         
---- VAR W               .       12.237     +INF       .         
---- VAR PX              .        0.992     +INF       .         
---- VAR PY              .        1.010     +INF       .         
---- VAR PL              .        1.048     +INF       .         
---- VAR PK              .        0.956     +INF       .         
---- VAR PW              .        1.003     +INF       .         
---- VAR CONS            .     1964.331     +INF       .         

EXERCISE (3). CES Utility Function -- SIGMA = 0.5

ENDOW = 1

E x e c u t i o n

----    922 Minimum Consumption --CES function, SIGMA = 2

----    922 PARAMETER XBAR                 =       40.000 Minimum consumption 
                                                          level


               L O O P S         SC         SC1       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        1.000     +INF       .         
---- VAR Y               .        1.000     +INF       .         
---- VAR W               .        1.000     +INF       .         
---- VAR PX              .        1.005     +INF       .         
---- VAR PY              .        1.005     +INF       .         
---- VAR PL              .        1.005     +INF       .         
---- VAR PK              .        1.005     +INF       .         
---- VAR PW              .        1.005     +INF       .         
---- VAR CONS            .      160.729     +INF       .         

ENDOW = 3
               L O O P S         SC         SC2       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        2.533     +INF       .         
---- VAR Y               .        3.464     +INF       .         
---- VAR W               .        3.498     +INF       .         
---- VAR PX              .        0.997     +INF       .         
---- VAR PY              .        1.010     +INF       .         
---- VAR PL              .        1.037     +INF       .         
---- VAR PK              .        0.972     +INF       .         
---- VAR PW              .        1.005     +INF       .         
---- VAR CONS            .      562.550     +INF       .         

ENDOW = 5
               L O O P S         SC         SC3       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        4.067     +INF       .         
---- VAR Y               .        5.926     +INF       .         
---- VAR W               .        5.995     +INF       .         
---- VAR PX              .        0.996     +INF       .         
---- VAR PY              .        1.011     +INF       .         
---- VAR PL              .        1.043     +INF       .         
---- VAR PK              .        0.965     +INF       .         
---- VAR PW              .        1.005     +INF       .         
---- VAR CONS            .      964.171     +INF       .         

ENDOW = 8
               L O O P S         SC         SC4       


                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        6.369     +INF       .         
---- VAR Y               .        9.617     +INF       .         
---- VAR W               .        9.741     +INF       .         
---- VAR PX              .        0.995     +INF       .         
---- VAR PY              .        1.012     +INF       .         
---- VAR PL              .        1.046     +INF       .         
---- VAR PK              .        0.962     +INF       .         
---- VAR PW              .        1.005     +INF       .         
---- VAR CONS            .     1566.566     +INF       .         

ENDOW = 10
               L O O P S         SC         SC5       

                       LOWER     LEVEL     UPPER    MARGINAL  

---- VAR X               .        7.903     +INF       .         
---- VAR Y               .       12.078     +INF       .         
---- VAR W               .       12.238     +INF       .         
---- VAR PX              .        0.994     +INF       .         
---- VAR PY              .        1.012     +INF       .         
---- VAR PL              .        1.048     +INF       .         
---- VAR PK              .        0.960     +INF       .         
---- VAR PW              .        1.005     +INF       .         
---- VAR CONS            .     1968.154     +INF       .         


E x e c u t i o n

----   1041 PARAMETER CIES          Calibrated income elasticity of demand

           I=200     SIGMA=1   SIGMA=0.5   SIGMA=2.0

TEST       0.750
SC1                    0.750       0.750       0.750
SC2                    0.901       0.901       0.901
SC3                    0.938       0.938       0.938
SC4                    0.960       0.960       0.960
SC5                    0.968       0.968       0.968