Introduction to Mathematics for Economics with R

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book provides a practical introduction to mathematics for economics using R software. Using R as a basis, this book guides the reader through foundational topics in linear algebra, calculus, and optimization. The book is organized in order of increasing difficulty, beginning with a rudimentary introduction to R and progressing through exercises that require the reader to code their own functions in R. All chapters include applications for topics in economics and econometrics. As fully reproducible book, this volume gives readers the opportunity to learn by doing and develop research skills as they go. As such, it is appropriate for students in economics and econometrics.

Author(s): Massimiliano Porto
Publisher: Springer
Year: 2022

Language: English
Pages: 865
City: Cham

Preface
Contents
List of Figures
List of Tables
1 Introduction to R
1.1 Installing R
1.2 Installing RStudio
1.3 Introduction to RStudio
1.3.1 Launching a New Project
1.3.2 Opening an R Script
1.4 Packages to Install
1.4.1 How to Install a Package
1.4.2 How to Load a Package
1.5 Good Practice and Notation
1.5.1 How to Read the Code
1.6 8 Key-Points Regarding R
1.6.1 The Assignment Operator
1.6.2 The Class of Objects
1.6.3 Case Sensitiveness
1.6.4 The c() Function
1.6.5 Square Bracket Operator [ ]
1.6.6 Loop and Vectorization
1.6.7 Functions
1.6.8 Errors
1.6.8.1 Syntax Errors
1.6.8.2 class() Type Errors
1.6.8.3 Warning Message
1.6.8.4 No-Error Message Error
1.7 An Example with R
1.8 Exercise
1.8.1 Exercise 1
1.8.2 Exercise 2
Part I Introduction to Mathematics for Static Economics
2 Linear Algebra
2.1 Set, Group, Ring, Field: Short Overview
2.2 Vectors
2.2.1 Vector Space
2.2.1.1 Properties of Vector Space
2.2.1.2 Vector Notation
2.2.2 Vector Representation in Two and Three Dimensions
2.2.3 Inner Product
2.2.4 Outer Product
2.2.5 Component Form, Magnitude and Unit Vector
2.2.6 Parallel and Orthogonal Vectors
2.2.7 Vector Projection
2.2.8 Linear Independence
2.3 Matrices
2.3.1 Matrix Operations
2.3.1.1 Addition
2.3.1.2 Multiplication
2.3.1.3 Transpose
2.3.2 Symmetric Matrix
2.3.3 Diagonal Matrix and Identity Matrix
2.3.3.1 Trace of a Square Matrix
2.3.4 Triangular Matrix
2.3.5 Idempotent Matrix
2.3.6 The Inverse of a Matrix
2.3.7 System of Linear Equations
2.3.7.1 System of Linear Equations and Matrices
2.3.7.2 Gauss Elimination and Gauss-Jordan Elimination
2.3.7.3 The Rank of a Matrix
2.3.8 Determinant
2.3.8.1 The Determinant of a 2 2 Matrix
2.3.8.2 Laplace Expansion Method
2.3.8.3 The Determinant and the Matrix Inverse
2.3.8.4 Cramer's Rule
2.3.9 Eigenvalues and Eigenvectors
2.3.9.1 Diagonalization and Jordan Canonical Form
2.3.10 Partitioned Matrix
2.3.11 Kronecker Product
2.3.12 Definiteness of Matrices
2.3.13 Decomposition
2.3.13.1 Spectral Decomposition
2.3.13.2 Singular Value Decomposition (SVD)
2.3.13.3 Cholesky Decomposition
2.3.13.4 QR Decomposition
2.4 Applications in Economics
2.4.1 Budget Set
2.4.2 Applying Cramer's Rule to the IS-LM Model
2.4.3 Leontief Input-Output Model
2.4.4 Network Analysis
2.4.5 Linear Model and the Dummy Variable Trap
2.5 Exercises
2.5.1 Exercise 1
2.5.2 Exercise 2
2.5.3 Exercise 3
2.5.4 Exercise 4
2.5.5 Exercise 5
2.5.6 Exercise 6
2.5.7 Exercise 7
3 Functions of One Variable
3.1 What is a Function?
3.1.1 Domain and Range
3.1.2 Monotonicity, Boundedness and Extrema
3.1.3 Convex and Concave Functions
3.1.4 Function Operations
3.2 Linear Function
3.2.1 Slope of Linear Function
3.2.2 Applications in Economics
3.2.2.1 The Cost Function
3.2.2.2 Break-Even
3.2.2.3 Mark-Up and Margin
3.2.2.4 Linear Models in Econometrics
3.3 Quadratic Function
3.3.1 Roots and Vertex
3.3.2 The Graph of the Quadratic Function
3.3.3 Discriminant
3.3.4 Applications in Economics
3.3.4.1 The Cost Function
3.4 Cubic Function
3.4.1 How to Solve Cubic Equations
3.4.2 Applications in Economics
3.4.2.1 The Cost Function
3.5 Polynomials of Degree Greater Than Three
3.6 Logarithmic and Exponential Functions
3.6.1 What is a Logarithm?
3.6.2 Logarithms and Exponents
3.6.3 The Natural Logarithm
3.6.4 The Natural Logarithmic Function
3.6.4.1 How to Solve Logarithmic Equation
3.6.5 Applications in Economics
3.6.5.1 Logarithms and Growth
3.6.5.2 Logarithms and Geometric Mean
3.6.5.3 Logarithms and Econometrics
3.6.6 Exponential Function
3.6.6.1 What is e ?
3.6.6.2 How to Solve Exponential Equations
3.6.7 Applications in Economics
3.6.7.1 Exponential and Investment
3.6.7.2 Exponential Growth and Logistic Growth
3.7 Radical Function
3.7.1 How to Solve Radical Equation
3.7.2 Find the Domain of a Radical Function
3.7.3 Radicals and Rational Exponents
3.7.4 Applications in Economics
3.7.4.1 Production Function with a Single Input
3.8 Rational Function
3.8.1 Intercepts and Asymptotes
3.8.2 Applications in Economics
3.8.2.1 Indifference Curve
3.8.2.2 A ``Work'' Example
3.9 Exercises
3.9.1 Exercise 1
3.9.2 Exercise 2
3.9.3 Exercise 3
3.9.4 Exercise 4
3.9.5 Exercise 5
4 Differential Calculus
4.1 What is the Meaning of Derivatives?
4.2 The Limit of a Function
4.3 Limits, Derivatives and Slope
4.3.1 Newton-Raphson Method
4.4 Notation of Derivatives
4.5 Differentials
4.6 Rules of Differentiation
4.6.1 Power Rule
4.6.2 Product Rule
4.6.3 Quotient Rule
4.6.4 Chain Rule
4.6.4.1 Implicit Differentiation
4.6.5 Radicals Differentiation
4.6.6 Logarithmic Differentiation
4.6.7 Exponential Differentiation
4.6.7.1 Exponential Growth and Logistic Growth
4.6.8 Derivatives of Elementary Functions
4.7 Derivatives and Inverse Functions
4.8 Tangent Line to the Function
4.9 Points of Minimum, Maximum and Inflection
4.10 Taylor Expansion
4.10.1 Nth-Derivative Test
4.10.2 Newton-Raphson Method
4.11 L'Hôpital Theorem
4.12 Derivatives with R
4.13 Taylor Expansion with R
4.14 Applications in Economics
4.14.1 Marginal Cost
4.14.1.1 Coefficients of a Cubic Cost Function
4.14.2 Marginal Cost and Average Cost
4.14.3 Profit Maximization
4.14.4 Elasticity
4.15 Exercise
4.15.1 Exercise 1
4.15.2 Exercise 2
4.15.3 Exercise 3
5 Integral Calculus
5.1 Indefinite Integrals
5.1.1 Anti-derivative Process
5.1.1.1 Fundamental Integrals
5.1.1.2 Integration by Substitution
5.1.1.3 Integration by Parts
5.1.1.4 Partial Fractions
5.2 Definite Integrals
5.2.1 Area Under a Curve
5.2.2 Area Between Two Lines
5.3 Fundamental Theorem of Calculus
5.4 Improper Integrals and Convergence
5.4.1 Case 1: Convergence
5.4.2 Case 2: Divergence
5.5 Integration with R
5.6 Applications in Economics
5.6.1 Marginal Cost and Cost Function
5.6.2 Example: A Problem
5.6.3 The Surplus of Consumer and Producer
5.7 Exercise
6 Multivariable Calculus
6.1 Functions of Several Variables
6.1.1 Applications in Economics
6.1.1.1 Complementary Goods and Substitute Goods
6.1.1.2 The Cobb-Douglas Function
6.1.1.3 The Constant Elasticity of Substitution (CES) Function
6.1.1.4 The Cobb-Douglas Function as a Special Case of the CES Function
6.2 Partial and Total Derivatives
6.2.1 Partial Derivatives
6.2.1.1 Gradient Vector
6.2.1.2 Jacobian Matrix
6.2.1.3 Hessian Matrix
6.2.2 Total Derivatives
6.2.3 Derivatives with R
6.2.4 Applications in Economics
6.2.4.1 Marginal Product of Labour and Capital
6.2.4.2 The Law of Diminishing Marginal Productivity
6.2.4.3 An Application with the Jacobian
6.3 Unconstrained Optimization
6.3.1 First Order Condition
6.3.2 Second Order Condition
6.3.2.1 Concavity and Convexity
6.3.3 Optimization with R
6.3.4 Applications in Economics
6.3.4.1 Multi-product Firm
6.3.4.2 Ordinary Least Square
6.4 Integration with Multiple Variables
6.5 Exercises
6.5.1 Exercise 1
6.5.2 Exercise 2
7 Constrained Optimization
7.1 Equality Constraints
7.1.1 First-Order Condition
7.1.2 Multiple Equality Constraints
7.1.3 Lagrange Multiplier
7.1.3.1 A Mathematical Interpretation
7.1.3.2 An Economic Interpretation
7.1.4 Second-Order Conditions
7.2 Inequality Constraints
7.2.1 Kuhn-Tucker Conditions
7.3 Constrained Optimization with R
7.4 Applications in Economics
7.4.1 Utility Maximization Problem
7.4.2 Firm's Cost Minimization Problem
7.4.3 Transportation Problem
7.4.4 CGE Model with R
7.4.4.1 Shoven-Whalley Model Without Taxes
7.4.4.2 Solving the Model with R
7.5 Exercise
Part II Introduction to Mathematics for Dynamic Economics
8 Trigonometry
8.1 Right Triangles and Angles
8.2 Trigonometric Functions
8.3 Sum and Differences of Angles
8.4 Derivatives of Trigonometric Functions
9 Complex Numbers
9.1 Set of Complex Numbers
9.2 Complex Numbers: Real Part and Imaginary Part
9.3 Arithmetic Operations
9.4 Geometric Interpretation and Polar Form
9.5 Exponential Form
10 Difference Equations
10.1 First-Order Linear Difference Equations
10.1.1 Solution by Iteration
10.1.2 Solution by General Method
10.1.3 Time Path and Equilibrium
10.2 Second-Order Linear Difference Equations
10.2.1 Solution to Second-Order Linear Homogeneous Difference Equation
10.2.1.1 Two Distinct Real Roots (Case of D > 0 )
10.2.1.2 One Real Root (or Repeated Real Roots) (Case of D = 0 )
10.2.1.3 Complex Roots (Case of D < 0 )
10.2.2 Solution to Second-Order Linear Nonhomogeneous Difference Equation
10.2.3 Time Path and Equilibrium
10.3 System of Linear Difference Equations
10.3.1 Equilibrium
10.3.2 Solution with the Powers of a Matrix
10.3.3 Eigenvalues Method
10.3.3.1 Case 1: Distinct Real Eigenvalues
10.3.3.2 Case 2: Repeated Real Eigenvalues
10.3.3.3 Case 3: Complex Eigenvalues
10.3.4 Graphing Trajectory of a Discrete System
10.4 Transforming High-Order Difference Equations
10.5 Applications in Economics
10.5.1 A Problem with Interest Rate
10.5.2 The Cobweb Model
10.5.3 The Harrod-Domar Growth Model
10.5.4 Law of Motion for Public Debt
10.5.5 Linear Difference Equations and Autoregressive Process
10.6 Exercises
10.6.1 Exercise 1
10.6.2 Exercise 2
10.6.3 Exercise 3
11 Differential Equations
11.1 On the Solution of Differential Equations
11.1.1 Existence and Uniqueness
11.1.2 Implicit and Explicit Solutions
11.1.3 Complementary and Particular Solutions
11.1.4 Verification of the Solution
11.1.5 Initial Value Problem
11.1.6 Analytical Solution and Numerical Solution
11.1.6.1 The Euler Method
11.1.6.2 The Runge-Kutta Method
11.1.7 Geometric Interpretation
11.2 Methods to Solve First-Order Differential Equations
11.2.1 Separation of Variables
11.2.2 Substitution Method for Homogeneous-Type Equations
11.2.3 Integrating Factor
11.2.4 Exact Equations
11.2.5 Reduction to Linearity: Bernoulli Equation
11.3 Time Path and Equilibrium
11.4 Second-Order Linear Differential Equations
11.4.1 Solution to Second-Order Linear Homogeneous Differential Equation
11.4.1.1 Two Distinct Real Roots (Case of D > 0 )
11.4.1.2 One Real Root (or Repeated Real Roots) (Case of D = 0 )
11.4.1.3 Complex Roots (Case of D < 0 )
11.4.2 Solution to Second-Order Linear Nonhomogeneous Differential Equation
11.4.3 The Dynamic Stability of the Equilibrium
11.4.4 Method of Undetermined Coefficients
11.5 System of Linear Differential Equations
11.5.1 Eigenvalues Method
11.5.1.1 Case 1: Distinct and Real Eigenvalues
11.5.1.2 Case 2: Repeated Real Eigenvalues
11.5.1.3 Case 3: Complex Eigenvalues
11.5.2 Equilibrium
11.5.2.1 Geometric Interpretation
11.6 Transforming High-Order Differential Equations
11.7 Differential Equations with R
11.8 Applications in Economics
11.8.1 A Problem with Interest Rate
11.8.2 Advertising Model
11.8.3 The Harrod-Domar Growth Model
11.8.4 The Solow Growth Model
11.9 Exercises
A Packages Used in Chapters
B Appendix to Chap.2
Code to Replicate Fig.2.3
C Appendix to Chap.3
Code to Replicate Fig.3.1
Code to Replicate Fig.3.2
Code to Replicate Fig.3.3
D Appendix to Chap.4
Code to Replicate Fig.4.1
Code to Replicate Fig.4.2
Code to Replicate Fig.4.3
Code to Replicate Fig.4.4
Code to Replicate Fig.4.5
Code to Replicate Fig.4.6
Code to Replicate Fig.4.13
E Appendix to Chap.5
Code to Replicate Fig.5.2
Code to Replicate Fig.5.3
Code to Replicate Fig.5.4
Code to Replicate Fig.5.5
Code to Replicate Fig.5.6
Code to Replicate Fig.5.7
Code to Replicate Fig.5.8
F Appendix to Chap.7
Code to Replicate Fig.7.1
Code to Replicate Fig.7.2
Code to Replicate Fig.7.3
G Appendix to Chap.8
Code to Replicate Fig.8.1
Code to Replicate Fig.8.2
Code to Replicate Fig.8.3
Code to Replicate Fig.8.4
Code to Replicate Fig.8.5
Code to Replicate Fig.8.6
H Appendix to Chap.9
Code to Replicate Fig.9.1
Code to Replicate Fig.9.2
I Appendix to Chap.10
Code to Replicate Fig.10.2
Code to Replicate Fig.10.3
Code to Replicate Fig.10.4
Code to Replicate Fig.10.5
J Appendix to Chap.11
Code to Replicate Fig.11.1
Code to Replicate Fig.11.7
Code to Replicate Fig.11.8
Bibliography
Index