LaTeX for economics

Save some time and re-use my code.

All of the codes below require the TikZ and pgfplots packages. Some also require GNUPLOT.

Plot arbitrary utility function in 3D and its indifference curves

Requires GNUPLOT. User can set utility function, and utility levels.

[Code: TeX] [Result: PDF] This is an image

Indifference curves for an arbitrary utility function

Requires GNUPLOT. User can set utility function, and utility levels.

[Code: TeX] [Result: PDF] This is an image

Decomposing a price change into income and substitution effects

Requires GNUPLOT. Arbitrary utility function, but optimal choices must be comptued manually.

[Code: TeX] [Result: PDF] This is an image

Compensated and uncompensated demands

Compensated and uncompensated demand functions must be computed manually. Intersections are computed automatically. Numerical values must be computed manually.

[Code: TeX] [Result: PDF] This is an image

Long-run and short-run equilibria following change in demand

User supplies marginal and average cost functions, and demands. The rest is computed automatically.

[Code: TeX] [Result: PDF] This is an image

Consumer surplus, producer surplus, and deadweight loss under a price floor

User supplies arbitrary demand and supply functions, and the price floor, higher than the original equilibrium price. The rest is computed automatically.

[Code: TeX] [Result: PDF] This is an image

Edgeworth Box

Requires GNUPLOT. User supplies arbitrary utility functions, and points where the indifference curves should intersect, and the contract curve. The rest is computed automatically.

[Code: TeX] [Result: PDF] This is an image

Hypothesis testing (of a single proportion)

Distribution under the alternative hypothesis, and power/TypeII error, can be toggled on or off.

[Code: TeX] [Result: PDF]

This is an image