$title Program to read the SAM from Colombia set rows All rows in matrix / COF, OCR, LIV, FRS, OIL, OMN, CTH, FOD, NAT, NSL, HTC, CON TRN, ELE, COM, SRV, GOV, LAB, ILB, CAP, OTX VAT, TM0, MRG, MGT, TAX, SUB, DTAX, CONS, GOVT PUBF, PRIF, ROW, ACU , INVTR, PUBINV, PRIINV /; set i production Sectors / COF Coffee OCR Other crops LIV Livestock FRS "Forestry, fishing and hunting" OIL Oil OMN Other Minerals CTH Coffee Threshing FOD Foodstuffs NAT Natural Resources Intensive Industries NSL Non-skilled Labor Intensive Industries HTC Capital and High Technology Industries CON Construction TRN Transport ELE "Electricity, Gas and Water" COM Communications SRV Private Services GOV Government Services /; alias (rows, cols); parameter SAM(*,*) Social accounting matrix; * Read the data from the XLS workbook: $call gdxxrw i=sam.xls par=sam rng=Colombia-1996!D8:AO45 $gdxin sam.gdx $load sam $gdxin display sam; * Check for balance of the economy in Colombia: parameter chkbal(rows,*) Check balance of the rows and columns; chkbal(rows,"Coltot") = sum(cols, sam(cols, rows)); chkbal(rows,"Rowtot") = sum(cols, sam(rows, cols)); chkbal(rows,"Balance") = sum(cols, sam(rows, cols)) - sum(cols, sam(cols,rows)); display chkbal; alias (i,j); set L Labor types / informal, formal/; parameter y0(i) total output for each sector, ID0(i,j) Intermediate demand for each sector LD0(i,L) labor demand by sector KD0(i) capital demand by sector TX0(i) all taxes and margins together c0(i) household consumption for each good g0(i) government consumption for each good x0(i) exports in benchmark; ID0(i,j) = sam(i,j); LD0(i,"formal") = sam("lab",i); LD0(i,"informal") = sam("ilb",i); KD0(i) = sam("cap",i); tx0(i) = sam("OTX",i) + sam("VAT",i) + sam("TM0",i) + sam("MRG",i) + sam("MGT",i) + sam("TAX",i) + sam("SUB",i) ; c0(i) = sam(i,"CONS"); g0(i) = sam(i,"govt"); x0(i) = sam(i,"ROW"); y0(i) = sum(j, id0(j,i)) + sum(L, LD0(i,L)) + kd0(i) + tx0(i); display id0, c0, x0, g0, y0; * Compute some diagnostic statistics: parameter echop Echoprint of base year data va(i) Value added in sector; * You should compute some "descriptive statistics" for Colombia.