Gütermarktmodell
Author
Martin G. Haas
\[ Y = \frac{1}{1-c_1 - b_1} (c_0 + b_0 - b_2 i + G)\]
Plot.plot({
y: {domain:[0, 100]},
x: {domain:[0, 100]},
width: "1000",
height: "600",
grid: true,
marks:[
Plot.line(data_sim,{x: "Y", y: "C", stroke: "black"}), // consumption
Plot.text([c0], {x: 100, y: consumption[99] - 5, text: (k) => "C = c0 + c1 Yv"}), // consumption line text
Plot.line(data_sim,{x: "Y", y: "Z", stroke: "black"}), // demand
Plot.text([c0], {x: 95, y: consumption[99] + investment_Y[99]- investment_i + G - 6, text: (k) => "Z = C + I + G"}), // demand linetext
Plot.link([c0], {x1: 0, x2: 100, y1: 0, y2: 100, stroke: "grey"}), // 45°
Plot.link([c0], {x1: (k) => output[k], x2: (k) => output[k], y1: 0, y2: (k) => output[k], stroke: "red"}), // output vertical
Plot.text([c0], {x: (k) => output[k] + 4, y: 2, text: (k) => "Yv = " + Math.round(output[k]*100)/100}), // vertical text
Plot.link([c0], {x1: 0, x2: (k) => output[k], y1: (k) => output[k], y2: (k) => output[k], stroke: "red"}), // output horizontal
Plot.text([c0], {x: 5, y: (k) => output[k] + 4, text: (k) => "Y,Z = " + Math.round(output[k]*100)/100}), // output horizontal text
Plot.link([c0], {x1: 0, x2: (k) => output[k], y1: (k) => c0 + c1*output[k], y2: (k) => c0 + c1*output[k], stroke: "red"}), // consumption horizontal
Plot.text([c0], {x: 4, y: (k) => c0 + c1*output[k] -4, text: (k) => "C = " + Math.round((c0 + c1*output[k])*100)/100}), // consumption horizontal text
]
})