tax_graph: Tax graph

Description Usage Arguments Author(s) Examples

View source: R/tax.R

Description

TODO

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
tax_graph(
  demand_fun,
  supply_fun,
  supply_tax,
  names = c("Consumer surplus", "Producer surplus", "DWL", "Consumer tax burden",
    "Producer tax burden"),
  title = NULL,
  xlab = "Product (Q)",
  ylab = "Price (P)",
  colors,
  shaded = FALSE,
  xlim = c(0, 45),
  ylim = c(0, 20),
  max_x = 45,
  bg.col = "white"
)

Arguments

demand_fun

TODO

supply_fun

TODO

supply_tax

TODO

names

TODO

title

TODO

xlab

TODO

ylab

TODO

colors

TODO

shaded

TODO

xlim

TODO

ylim

TODO

max_x

TODO

bg.col

TODO

Author(s)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Data
demand <- function(Q) 20 - 0.5 * Q
demand_new <- function(Q) demand(Q) + 5
supply <- function(Q) 2 + 0.25 * Q
supply_new <- function(Q) supply(Q) + 5

supply_tax <- function(Q) supply(Q) + 5

demand_elastic <- function(Q) 10 - 0.05 * Q
demand_inelastic <- function(Q) 20 - 2 * Q

supply_elastic <- function(Q) 2 + 0.05 * Q
supply_elastic_tax <- function(Q) supply_elastic(Q) + 5
supply_inelastic <- function(Q) 2 + 1.5 * Q
supply_inelastic_tax <- function(Q) supply_inelastic(Q) + 5

normal_taxes <- tax_graph(demand, supply, supply_tax, NULL)
normal_taxes_shaded <- tax_graph(demand, supply, supply_tax, shaded = TRUE)
normal_taxes_shaded$p

R-CoderDotCom/econocharts documentation built on Oct. 16, 2021, 12:42 p.m.