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.
Indifference curves for an arbitrary utility function
Requires GNUPLOT. User can set utility function, and utility levels.
Decomposing a price change into income and substitution effects
Requires GNUPLOT. Arbitrary utility function, but optimal choices must be comptued manually.
Compensated and uncompensated demands
Compensated and uncompensated demand functions must be computed manually. Intersections are computed automatically. Numerical values must be computed manually.
Long-run and short-run equilibria following change in demand
User supplies marginal and average cost functions, and demands. The rest is computed automatically.
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.
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.
Hypothesis testing (of a single proportion)
Distribution under the alternative hypothesis, and power/TypeII error, can be toggled on or off.