create_market: Create a series of elements to analize market's dinamic

create_marketR Documentation

Create a series of elements to analize market's dinamic

Description

Given a set of prices and quantities create all the market needed to analize a market using linear curves like:

Usage

create_market(price_q0, slope, perfect_e = NULL, perfect_i = NULL)

Arguments

price_q0

It's the parameter a and for both, demanded and/or supplied quantities are equal to 0

slope

Ir's the parameter b and it's the rate at witch prices changes due to a change of the quantity demanded or supplied

perfect_e

Perfectly elastic demand (negative value) or supply (positive value)

perfect_i

Perfectly inelastic demand (negative value) or supply (positive value)

Details

$$P = a + bx$$

Value

Element of class "market_curves". The result is a list with the following elements, for each of the curves: name: Wether it is a demand or supply curve funs: Functional form of the curve equation: Latex formula to print in coeficients: The value of the slopes and intercepts as matrix intercept: The value of the intercept (plotting porpuses)

Examples


# Make a demand curve:

demand <- create_market(price_q0 = 200,slope = -4)

# Make a supply curve:

supply <- create_market(price_q0 = 100,slope = 2)

# Find the equilibrium:

equiilibrium <- create_market(price_q0 = c(200,100),slope = c(-4,2))

# Many demands and one supply:

equiilibrium <- create_market(price_q0 = c(200,100,150),slope = c(-4,2,3))

# Works the same way for many supply curves

AlexB4891/phenomenology documentation built on March 29, 2022, 8:56 p.m.