$ontext Travis Warziniack, University of Heidelberg March 2009 -- MODEL OVERVIEW ---- A previous program cge_4x2x2.gms built a cge model with four industries, two factors of production, and two households. Two of those industries where not consumed by households but were used as inputs to other sectors of the economy. The power sector, for example, is composed of various types of energy inputs (fossil, wind, etc.). Households do not actually purchase input-specific power, rather, they just consume power. This program builds on that model to include a sector which is produced regionally using traditional inputs and factors, consumed by households, but is not used as an input into any other sector's production process. The motivating example for this scenario is a good like wildlife viewing. Households spend a considerable amount of money to enjoy this pastime (buying equipment, traveling to desiniations, etc) but wildlife viewing itself is not actually used as an input into other sectors of the economy (one could argue that tourist-related industries actually do use such goods as inputs, but we will leave that discussion for a later time.) Firms produce using a Leontiff production technology with inputs (intermediates and an aggregrate value added) as a fixed portion of output, where value added is composed of capital and labor, combined through cost minimization of a CES function, VA = gva*(af(f1)*FAC(1)**r + af(2)*FAC(2)**r + ..)**(1/r) where r = 1 - 1/s and s is the elasticity of substitution of factors in the value added function. af is the share of each factor in the production function and gva is an efficiency parameter. All payments to factors first go to a factor 'institution', and are then distributed to the households according to share of the factors that they own. In the program code, capitalized letters indicate a variable or a parameter that serves as the benchmark value for a variables. Lower case indicates parameters, sets, and equations. There are a number of shortcuts or other reading worth reading about CES functions, inlcuding Rutherford (2008), Temple (2008), and XX. $offtext set i industries /agr,pow,fos,ren,wild/ f factors /lab,cap/ h household /hhd1,hhd2/; alias (i,ii),(f,ff),(h,hh); $ontext -- DATA -------------- Data for CGE models is usually provided through a social accounting matrix, or SAM. Columns of the SAM represent expenses to the sector indicated by the column heading, and rows represent income to the sector indicated by the row heading. Because we will be using equations that are homogenous of degree one in prices (?), a convenient assumption is that all benchmark prices are equal to one, so the SAM represents both quantity and monetary values. The SAM must be balanced, in that the sum of entries in each row must be equal to the sum of entries in the column with the same name. The SAM for this example is exactly alike that used in cge_4x2x2 (shown below) except that a new sector wild is created (by using shares of agr) that is consumed by households but not used as an input into other sectors' production process. The SAM for the 4x2x2 model was table sam(*,*) agr pow fos ren lab cap hhd1 hhd2 agr 10 5 10 5 pow 10 20 10 fos 20 ren 20 lab 10 5 10 cap 10 5 5 hhd1 20 10 hhd2 5 10 which becomes $offtext table sam(*,*) agr pow fos ren wild lab cap hhd1 hhd2 agr 8 5 8 3 pow 8 2 20 10 fos 20 ren 20 wild 2 2 2 lab 8 5 10 2 cap 8 5 5 2 hhd1 20 10 hhd2 5 10 * from which we again read off the benchmark values parameter Vo(ii,i) intermediate demand by industry i of input ii FACo(f,i) demand of factor f by industry i endow(h,f) endowment of factor f by household h HHXo(i,h) demand of good i by household h; Vo(ii,i) = sam(ii,i); FACo(f,i) = sam(f,i); endow(h,f) = sam(h,f); HHXo(i,h) = sam(i,h); $ontext -- HOUSEHOLD -------------- Households are heterogenous in preferences and income. Each household maximizes constant elasticity of substitution (CES) preferences U = (ah(agr,h)*HHX(agr,h)**rh(h) + ah(watr,h)*HHX(watr,h)**rh(h))**(1/rh(h)) where rh(h) is a parameter based on the elasticity of substiution rh(h) = 1 - 1/sh(h), subject to a budget constraint. HHI = PD(agr)*HHX(agr,h) + PD(watr)*HHX(watr,h) The household owns labor and labor which earn prices PF(f) in the marketplace. Earnings from factors are assumed to go to factor 'institutions' then distributed to the households based on their share of the factor. $offtext parameter HHIo(h) household disposable income HHXo(i,h) household demand of good i FACPMTo(f) total payments to factor thetaf(f,h) share of factor f owned by household h sh(h) household elasticity of substitution taken from the literature rh(h) parameter based on sh(h) ah(i,h) share of good i in demand function; FACPMTo(f) = sum(i,sam(f,i)); thetaf(f,h) = endow(h,f)/FACPMTo(f); HHIo(h) = sum(f,thetaf(f,h)*FACPMTo(f)); sh(h) = 0.9; rh(h) = 1 - 1/sh(h); ah(i,h) = ((HHIo(h)/HHXo(i,h))**(rh(h)/(1-sh(h))))$HHXo(i,h); * once the demand function has been calibrated it can be written as HHXo(i,h) = (ah(i,h)/1)**sh(h) * HHIo(h) / sum(ii, 1*(ah(ii,h)/1)**sh(h)); $ontext -- FIRMS ------------- Firms cost minimize to meet demand, given a production technology. The production function is assumed to be Leontiff such that the firm uses fixed portions of each input for a given amount of output. Total costs are the sum of expenses on intermediate inputs and value added. Value added is made composed of primary factors of production, combined in a CES production function VA = gva*(af(f1)*FAC(1)**r + af(2)*FAC(2)**r + ..)**(1/r) where r = 1 - 1/s and s is the elasticity of substitution of factors in the value added function. af is the share of each factor in the production function and gva is an efficiency parameter. Industry-specific indices have been omitted, but VA, gva, af, FAC, r, and s vary by industry. Following Sancho 'Calibration of CES functions for real-world multi-sectoral modeling' (No date?), define tva(f) = (gva*af(f))**1/r. VA can be rewritten VA = ((tva(1)*FAC(1))**r + (tva(2)*FAC(2))**r + ..)**(1/r) and tva(i) can be solved to get tva(j) = (VA/FAC(j))**(1/eta) where eta = 1 - s. The unit cost of value added (or any CES production technology) is unit cost = (sum(f,(1/tva(f,i))**eta(i)))**(1/eta(i)); $offtext parameters CVo(i) total costs VAo(i) value added input DYo(i) output of local firms aint(ii,i) share of i's output produced by using ii ava(i) share of i's output produced using factors FACo(f,i) demand of factor f by industry i tva(f,i) calibration parameter for value added eta(i) parameter for value added function based on elasticity of substitution r(i) parameter based on value added elasticity s(i) elasticity of substitution between capital and labor /agr 0.61 pow 0.80 fos 0.80 ren 0.80 wild 0.61/; VAo(i) = sum(f,FACo(f,i)); DYo(i) = VAo(i) + sum(ii,Vo(ii,i)); r(i) = 1 - 1/s(i); eta(i) = 1 - s(i); tva(f,i)$FACo(f,i) = (VAo(i)/FACo(f,i))**(1/eta(i)); aint(ii,i) = Vo(ii,i)/DYo(i); ava(i) = VAo(i)/DYo(i); FACo(f,i)$tva(f,i) = VAo(i) * (tva(f,i)/1)**s(i) * 1/(tva(f,i)*sum(ff, 1**(1-s(i)) * tva(ff,i)**(s(i)-1))); VAo(i) = ava(i)*DYo(i); CVo(i) = sum(ii,aint(ii,i)*DYo(i)) + (VAo(i)*(sum(f,(1/tva(f,i))**eta(i)))**(1/eta(i)))$VAo(i); $ontext -- EQUILIBRIUM Domestic prices PD(i) adjust until total supply Q(i) equals total demand X(i). Firms are the only sumpplier; demand consists of demand for intermediate inputs for production and household consumption. The firm is also assumed to have zero profits. Prices of factors PF(f) adjust until supply of factors equals demand. $offtext parameters Qo(i) total supply Xo(i) total demand PIo(i) industry profits MKTo(i) market clearing condition FCLEAR(f) factor market clearing condition; Qo(i) = DYo(i); Xo(i) = sum(ii,Vo(i,ii)) + sum(h,HHXo(i,h)); PIo(i) = CVo(i) - DYo(i); MKTo(i) = Qo(i) - Xo(i); FCLEAR(f) = sum(i,FACo(f,i)) - sum(h,endow(h,f)); display MKTo, PIo, CVo, DYo, FACo, ava, tva; $ontext -- CGE MODEL Now that the model is set up and calibrated with parameters, equivalent equations are created. The model requires prices to solve, which should equal one if the benchmark calibration is write. $offtext * Prices variables PD(i), PF(f); * Household variables HHI(h), HHX(i,h), FACPMT(f), VA(i), FAC(f,i); equations EQFACPMT(f), EQHHI(h), EQHHX(i,h); EQFACPMT(f).. FACPMT(f) =e= sum(i,FAC(f,i)*PF(f)); EQHHI(h).. HHI(h) =e= sum(f,thetaf(f,h)*FACPMT(f)); EQHHX(i,h).. HHX(i,h) =e= (ah(i,h)/PD(i))**sh(h) * HHI(h) / sum(ii, PD(ii)*(ah(ii,h)/1)**sh(h)); * Firms variables DY(i), V(ii,i), CV(i), PI(i); equations EQCV(i), EQV(ii,i), EQVA(i), EQFAC(f,i), EQDY(i); EQCV(i).. CV(i) =e= sum(ii, V(ii,i)*PD(i)) + (VA(i) * (sum(f,(PF(f)/tva(f,i))**eta(i)))**(1/eta(i)))$VAo(i); EQV(ii,i).. V(ii,i) =e= aint(ii,i)*DY(i); EQVA(i).. VA(i) =e= ava(i)*DY(i); EQFAC(f,i).. FAC(f,i) =e= (VA(i) * (tva(f,i)/PF(f))**s(i) * 1/(tva(f,i)*sum(ff, PF(ff)**(1-s(i)) * tva(ff,i)**(s(i)-1))))$FACo(f,i); EQDY(i).. PI(i) =e= CV(i) - DY(i)*PD(i); PI.fx(i) = 0; * Equilibrium variables Q(i), X(i); equations EQQ(i), EQX(i), EQPD(i), EQPF(f); EQQ(i).. Q(i) =e= DY(i); EQX(i).. X(i) =e= sum(h,HHX(i,h)) + sum(ii,V(i,ii)); EQPD(i).. Q(i) =e= X(i); EQPF(f).. sum(h,endow(h,f)) =e= sum(i,FAC(f,i)); HHI.l(h) = HHIo(h); HHX.l(i,h) = HHXo(i,h); CV.l(i) = CVo(i); V.l(i,ii) = Vo(i,ii); VA.l(i) = VAo(i); DY.l(i) = DYo(i); Q.l(i) = Qo(i); X.l(i) = Xo(i); PD.l(i) = 1; PF.l(f) = 1; FAC.l(f,i) = FACo(f,i); FACPMT.l(f) = sum(i,FACo(f,i)); model cge /EQFACPMT.FACPMT, EQHHI.HHI, EQHHX.HHX, EQCV.CV, EQV.V, EQVA.VA, EQFAC.FAC, EQDY.DY, EQQ.Q, EQX.X, EQPD.PD, EQPF.PF/; * replicate benchmark options iterlim = 0; solve cge using mcp; options iterlim = 5000; solve cge using mcp;