practica 6 micro

Upload: borja-fernandez-martinez

Post on 13-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/26/2019 Practica 6 Micro

    1/3

    $Ontext

    Sesi?n III-1

    Suponga que sus preferencias sobre ropa (x1) y comida (x2) se representanpor la funci?n de utilidad:

    U= x1**alpha1*X2**alpha2

    Si los precios iniciales son iguales a p1 = p2 = 20 euros, alpha1 y alpha2valen 0.3 y 0.7 respectivamente y su renta semanales de 500 euros. Determine las demandas ordinarias de ropa y comida?Cu?l es el efecto-renta y cu?l el efecto-sustituci?n sobre x1 si p1se incrementa a p1 = 50? Utilice las aproximaciones de Hicks y de Slutskyy comp?relas.$Offtext

    Parametersp1 Price of good 1 /20/

    p2 Price of good 2 /20/M Income /500/alpha1 Consumption share for good 1 /0.3/alpha2 Consumption share for good 2 /0.7/;

    VariablesU UtilityX1 Consumption of good 1X2 Consumption of good 2;

    Positive VariablesX1, X2;

    EquationsEUtility Utility functionEIncome Budget constraint;

    EUtility.. U =E= X1**alpha1*X2**alpha2;EIncome.. M =G= P1*X1 + P2*X2;

    X1.L =1;X2.L = 1;

    Model Utility /ALL/;

    set sim /sim0, sim1, sim2, subs, inc, tot/;set item /U, P1, X1, P2, X2, M/;

    ParameterReport(item,sim);

    *Simulation 0: Initial solutionSolve Utility using nlp maximizing U;

    report ('M','sim0') = M;report ('P1','sim0') = P1;

    report ('X1','sim0') = X1.L;report ('P2','sim0') = P2;report ('X2','sim0') = X2.L;

  • 7/26/2019 Practica 6 Micro

    2/3

    report ('U','sim0') = U.L;

    display report;

    * Simulation 1: We increase the price of good 1 to 50. Total impact;p1=50;Solve Utility using nlp maximizing U;

    report ('M','sim1') = M;report ('P1','sim1') = P1;report ('X1','sim1') = X1.L;report ('P2','sim1') = P2;report ('X2','sim1') = X2.L;report ('U','sim1') = U.L;

    display report;

    * Simulation 2: Substitution effect (Hicks);

    * Calculate the new level of consumption of both goods assuming* the consumer stays at the same level of utility, indicating which should be the* increase in income needed to be able to obtain the same level of utility as* the initial bundle but at the new prices (compensated income)

    Parameter U0 initial level of utility;U0= report ('U','sim0');

    * New model

    VariablesMV Income as variable

    ;

    Positive VariablesX1, X2;

    EquationsEUtility2 Utility functionEIncome2 Budget constraint;

    EUtility2.. U0 =E= X1**alpha1*X2**alpha2;EIncome2.. MV =G= P1*X1 + P2*X2;

    X1.L =1;X2.L = 1;

    Model Utility2 /Eutility2, EIncome2/;Solve Utility2 using nlp minimizing MV;

    report ('M','sim2') = MV.L;report ('P1','sim2') = P1;report ('X1','sim2') = X1.L;report ('P2','sim2') = P2;report ('X2','sim2') = X2.L;report ('U','sim2') = U0;

    display report;

  • 7/26/2019 Practica 6 Micro

    3/3

    * The substitution effect can be observed if we calculate the difference* between sim2 and sim0

    report ('M','subs') = report ('M','sim2') -report ('M','sim0');report ('P1','subs') = report ('P1','sim2') -report ('P1','sim0');report ('X1','subs') = report ('X1','sim2') -report ('X1','sim0');

    report ('P2','subs') = report ('P2','sim2') -report ('P2','sim0');report ('X2','subs') = report ('X2','sim2') -report ('X2','sim0');report ('U','subs') = report ('U','sim2') -report ('U','sim0');

    display report;

    * The income effect can be observed if we calculate the difference* between sim1 and sim2

    report ('M','inc') = report ('M','sim1') -report ('M','sim2');report ('P1','inc') = report ('P1','sim1') -report ('P1','sim2');report ('X1','inc') = report ('X1','sim1') -report ('X1','sim2');

    report ('P2','inc') = report ('P2','sim1') -report ('P2','sim2');report ('X2','inc') = report ('X2','sim1') -report ('X2','sim2');report ('U','inc') = report ('U','sim1') -report ('U','sim2');

    display report;

    * Total effect can be calculated as the sum of the substitution* and the income effects;

    report ('M','tot') = report ('M','inc') + report ('M','subs');report ('P1','tot') = report ('P1','inc') + report ('P1','subs');report ('X1','tot') = report ('X1','inc') + report ('X1','subs');

    report ('P2','tot') = report ('P2','inc') + report ('P2','subs');report ('X2','tot') = report ('X2','inc') + report ('X2','subs');report ('U','tot') = report ('U','inc') + report ('U','subs');

    display report;