create_market | R Documentation |
Given a set of prices and quantities create all the market needed to analize a market using linear curves like:
create_market(price_q0, slope, perfect_e = NULL, perfect_i = NULL)
price_q0 |
It's the parameter |
slope |
Ir's the parameter |
perfect_e |
Perfectly elastic demand (negative value) or supply (positive value) |
perfect_i |
Perfectly inelastic demand (negative value) or supply (positive value) |
$$P = a + bx$$
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)
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.