Carregando WebR...
# ============================================ # FPP, imposto e perda de eficiencia # Exercicio Resolvido 14.5 # ============================================ # --- FPP: X1^2 + X2^2 = 200 --- # Consumidores identicos: U = x1^(1/2) * x2^(1/2) # Imposto ad valorem t sobre bem 1 cat("====== FPP E DISTORCAO TRIBUTARIA ======\n\n") # --- Equilibrio sem imposto --- cat("--- Equilibrio sem imposto ---\n") X1_star <- sqrt(100) # X1 = X2 = 10 X2_star <- sqrt(100) U_star <- (X1_star/2)^0.5 * (X2_star/2)^0.5 TMT_star <- X1_star / X2_star TMS_star <- X2_star / X1_star # = 1 (simetria) cat("X1* =", X1_star, " X2* =", X2_star, "\n") cat("TMT = X1/X2 =", TMT_star, "\n") cat("TMS = X2/X1 =", TMS_star, "\n") cat("TMT = TMS?", abs(TMT_star - TMS_star) < 1e-10, "\n") cat("Utilidade por consumidor:", U_star, "\n\n") # --- Equilibrio com imposto --- taxas <- c(0.1, 0.25, 0.5, 1.0, 2.0) cat("--- Efeito do imposto t sobre bem 1 ---\n") cat(sprintf("%-6s %-8s %-8s %-8s %-8s %-10s %-8s\n", "t", "X1", "X2", "TMT", "TMS", "U/cons", "Perda%")) cat(strrep("-", 60), "\n") resultados <- data.frame() for (t in taxas) { # X2^2 = (1+t)*X1^2, na FPP: X1^2*(2+t) = 200 X1_t <- sqrt(200 / (2 + t)) X2_t <- sqrt(200 - X1_t^2) TMT_t <- X1_t / X2_t TMS_t <- (1 + t) * TMT_t # consumidor ve preco (1+t)*p1 U_t <- (X1_t/2)^0.5 * (X2_t/2)^0.5 perda <- (U_star - U_t) / U_star * 100 cat(sprintf("%-6.2f %-8.2f %-8.2f %-8.3f %-8.3f %-10.4f %-8.2f\n", t, X1_t, X2_t, TMT_t, TMS_t, U_t, perda)) resultados <- rbind(resultados, data.frame(t = t, X1 = X1_t, X2 = X2_t, U = U_t, perda = perda)) } cat("\nCONCLUSAO: O imposto cria uma cunha TMS != TMT.\n") cat("Quanto maior t, maior a distorcao e a perda de bem-estar.\n") # --- Grafico --- par(mfrow = c(1, 2), mar = c(4.5, 4.5, 3, 1), bg = "#f8f9fa") # Painel 1: FPP com e sem imposto theta <- seq(0, pi/2, length = 300) X1_fpp <- sqrt(200) * cos(theta) X2_fpp <- sqrt(200) * sin(theta) plot(X1_fpp, X2_fpp, type = "l", lwd = 3, col = "#343a40", xlab = expression(X[1]), ylab = expression(X[2]), main = "FPP e distorcao tributaria", xlim = c(0, 16), ylim = c(0, 16), asp = 1) # Ponto sem imposto points(X1_star, X2_star, pch = 19, col = "#198754", cex = 2) text(X1_star + 0.3, X2_star + 0.5, "Sem imposto\n(TMS = TMT)", col = "#198754", cex = 0.7, font = 2) # Ponto com t = 0.5 t05 <- 0.5 X1_05 <- sqrt(200/(2+t05)); X2_05 <- sqrt(200 - X1_05^2) points(X1_05, X2_05, pch = 17, col = "#dc3545", cex = 2) text(X1_05 - 0.3, X2_05 + 0.6, "t = 0.5\n(TMS != TMT)", col = "#dc3545", cex = 0.7, font = 2, pos = 2) # Ponto com t = 1.0 t10 <- 1.0 X1_10 <- sqrt(200/(2+t10)); X2_10 <- sqrt(200 - X1_10^2) points(X1_10, X2_10, pch = 15, col = "#fd7e14", cex = 1.8) text(X1_10 - 0.3, X2_10 + 0.6, "t = 1.0", col = "#fd7e14", cex = 0.7, font = 2, pos = 2) # Linha 45 graus (eficiencia) abline(a = 0, b = 1, col = "#198754", lty = 3, lwd = 1) legend("topright", legend = c("FPP", "Eficiente", "t=0.5", "t=1.0"), col = c("#343a40", "#198754", "#dc3545", "#fd7e14"), pch = c(NA, 19, 17, 15), lwd = c(3, NA, NA, NA), cex = 0.7, bg = "white") # Painel 2: Perda de bem-estar vs taxa t_seq <- seq(0, 3, length = 200) perda_seq <- sapply(t_seq, function(t) { X1 <- sqrt(200/(2+t)); X2 <- sqrt(200 - X1^2) U <- (X1/2)^0.5 * (X2/2)^0.5 (U_star - U) / U_star * 100 }) plot(t_seq, perda_seq, type = "l", lwd = 3, col = "#dc3545", xlab = "Taxa de imposto (t)", ylab = "Perda de bem-estar (%)", main = "Peso morto em equilibrio geral") abline(h = 0, col = "#adb5bd", lty = 2) points(0.5, resultados$perda[resultados$t == 0.5], pch = 19, col = "#dc3545", cex = 1.5) text(0.5, resultados$perda[resultados$t == 0.5] + 1, "t = 0.5", col = "#dc3545", cex = 0.8, font = 2)
▶ Executar
↻ Resetar
(Aguardando WebR...)