# R SCRIPT FILE FOR CALCULATING THE STEADY-STATE GROWTH RATE, THE REAL AND # NOMINAL INTEREST RATES AND THE EQUILIBRIUM LEVEL OF LIQUIDITY IN RELATION # TO THE CAPITAL STOCK # # SET INITIAL VALUES OF THE GROWTH PARAMETERS # hatm <- 0.14 delta <- 0.05 varpi <- .015 alpha <- 20 gamma <- .2 tau <- .01 oplkr <- .03 Ups <- .2 # Ups = 1 - (1/3)*(varphi/lambda)^3, which, given that # optlkr = varphi/lambda, implies values for varphi # and lambda of 8.944 and 298.142 respectively which # remain unchanged in all the analysis below # # For a situation where improved efficiency increases output by 4% # uncomment the following three lines lines # # newgamma <- .1822857 # oplkr <- oplkr*(hatm*(1 - newgamma) - delta)/(hatm * (1 - gamma) - delta) # gamma <- newgamma # # For a situation where the implicit tax on consumption increases by # 50 percent uncomment the following line # # tau <- .015 # # FIRST CALCULATE THE EQUILIBRIUM VALUES OF g AND r WHEN THE # LIQUIDITY/CAPITAL RATIO IS OPTIMUM IMPLYING THE FRIEDMAN RULE # # Calculate mterm, tterm and dmterm from the formulas on page 3 in the document # mterm <- hatm * (1 - gamma) - delta dmterm <- 0 # impose condition that dmterm = 0 tterm <- 1 # whence tterm = 1 # # To encorporate unemployment in the model, K is replaced by KU, the # fraction of the capital stock utilized. Since we are dealing # entirely with full-employment here, we set KU = 1, keeping # in mind that the units of capital are chosen so that K = 1. # KU <- 1 # # Full-employment output level equals mterm x tterm # Yf <- mterm * tterm # # SET INITIAL VALUE OF g = 0 AND CALCULATE acterm AND ssgterm # WHICH (equating (7) and (1) to eliminate r) WILL # SOLVE SIMULTANEOUSLY FOR g # g <- 0.00 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 # # THE CRITICAL VALUE TO BE MINIMISED NUMERICALLY TO FIND EQUILBIRUM g # BECOMES THE NEGATIVE NUMBER # crit <- ssgterm - ((mterm / acterm) * tterm) # crit # # FIND NUMERICALLY THE VALUE OF g FOR WHICH crit = 0 # repeat { g <- g + .000001 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm) * tterm) if (crit > .0) break } # # The repeat function above keeps recalculating the critical number # adding progressively .000001 to g, stopping the calculations when # the critical value passes 0. # # Write out the calculated critical value and the calculated level # of g # cat(crit);cat("\n") cat(g);cat("\n") # # NOW CALCULATE r by substituting the calculated value of g into # equation (1) and then write that value of r # r <- ssgterm cat(r);cat("\n") # # MODIFY THE CALCULATIONS TO ALLOW THE LEVEL OF LIQUIDITY TO BE # LESS THAN OPTIMAL -- WITH OUTPUT ALWAYS AT FULL-EMPLOYMENT # AND THE COST OF HOLDING MONEY SET EQUAL TO r SO THAT o = 0. # # First, we need values for varphi and lambda. With the full- # employment level of K normalized at unity, optimality of the # stock of liquidity implies that varphi = oplkr x lambda. Given # these values, a zero stock of liquidity implies that # Ups = 1 minus (oplkr x varphi-squared) [which should be corrected # to yield Ups = 1 minus (oplkr x varphi-squared/3)]. Hence # varphi <- sqrt((1 - Ups)*3/oplkr) lambda <- varphi/oplkr cat(varphi);cat("\n") cat(lambda);cat("\n") # # Set the initial value of L at oplkr (with K normalized at unity) # L <- oplkr cat(L);cat("\n") # # Recalculate tterm, dmterm, ssgterm and Yf # dmterm <- (varphi - (lambda * L))^2 tterm <- 1 - (1/(3*lambda))*(varphi - (lambda * L))^3 ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 Yf <- mterm * tterm # # Now calculate the value of o # o <- mterm*dmterm - r cat(o);cat("\n") cat(r);cat("\n") # # Set an initial value of g = 0 and equate equations C.1 and C.3 # substituting out r, and set crit equal to the left-side minus # the right-side -- the same calculation as was done earlier # g <- 0 tterm <- 1 - (1/(3*lambda))*(varphi - (lambda * L))^3 Yf <- mterm * tterm acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm)* tterm) # repeat { g <- g + .000001 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm) * tterm) if (crit > .0) break } # cat(g);cat("\n") r <- ssgterm # cat(r);cat("\n") o <- mterm*dmterm - r cat(Yf);cat("\n") cat(g);cat("\n") cat(o);cat("\n") cat(r);cat("\n") cat(L);cat("\n") cat(L-oplkr);cat("\n") cat(o+r);cat("\n") # # These calculations produce in more detail those generated the the previous # calculations # # INVESTIGATE WHAT HAPPENS TO o, r and g WHEN L IS ADJUSTED DOWNWARD FROM # ITS OPTIMUM LEVE # L <- .03 - .00269 # This number was obtained through experimentation g <- 0 dmterm <- (varphi - (lambda * L))^2 tterm <- 1 - (1/(3*lambda))*(varphi - (lambda * L))^3 Yf <- mterm * tterm acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm)* tterm) repeat { g <- g + .000001 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm) * tterm) if (crit > 0) break } r <- ssgterm o <- mterm*dmterm - r cat(g);cat("\n") cat(r);cat("\n") cat(o);cat("\n") cat(L);cat("\n") cat(L-oplkr);cat("\n") # # Inflation rate equals # infrate <- o cat(infrate);cat("\n") # # which is virtually zero so the nominal interest rate equals # i <- r + o cat(i);cat("\n") # # which is virtually identical to the real interest rate # # To see how the value of L was actually obtained, choose o = 0 in # the now complete model below # # # NOW GRADUALLY REDUCE L FROM ITS OPTIMUM LEVEL UNTIL o TAKES A PARTICULAR # VALUE AND THE COST OF HOLDING MONEY IS r + o (which must equal mterm*dmterm). # # TO SOLVE SIMULTANIOUSLY FOR THE EQUILBRIUM VALUES OF g, r and L # A DOUBLE LOOP IS REQUIRED --- optimize g at successively lower # (by tiny amount) values of L and check the value of o. Stop # when o has risen to the point where it just passes zero. # # Set the critical value of o --- which can be viewed as the equilibrium # expected inflation rate # crito <- 0 # uncomment to set the inflation rate equal to zero #crito <- .02 # uncomment to alternatively set the inflation rate at 2 percent #crito <- .50 # uncomment to alternatively set the inflation rate at 50 percent #crito <- 1.00 # uncomment to alternatively set the inflation rate at 100 percent L <- oplkr o <- mterm*dmterm - r for (i in 1:2000){ if (o < crito){L <- L - .00001} g <- 0 dmterm <- (varphi - (lambda * L))^2 tterm <- 1 - (1/(3*lambda))*(varphi - (lambda * L))^3 Yf <- mterm * tterm acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm)* tterm) repeat { g <- g + .00001 Yf <- mterm * tterm acterm <- 1 + (2 * alpha) * (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm) * tterm) if (crit > 0) break } o <- mterm*dmterm - r } cat(Yf);cat("\n") cat(g);cat("\n") cat(o);cat("\n") cat(r);cat("\n") cat(L);cat("\n") cat(L-oplkr);cat("\n") cat(o+r);cat("\n") # # # CALCULATE THE ABOVE VALUES WHERE L = 0 # mterm <- hatm * (1 - gamma) - delta dmterm <- varphi^2 tterm <- .2 ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 Yf <- mterm * tterm KU <- 1 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) # g <- 0 tterm <- .2 Yf <- mterm * tterm acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm)* tterm) # repeat { g <- g + .000001 acterm <- 1 + (2 * alpha)* (g + (KU - 1)* Yf) ssgterm <- ((1 + varpi)*(1 + g) / (1 - tau)) - 1 crit <- ssgterm - ((mterm / acterm) * tterm) if (crit > .0) break } r <- ssgterm o <- mterm*dmterm - r # cat(Yf);cat("\n") cat(g);cat("\n") cat(o);cat("\n") cat(r);cat("\n") cat(o+r);cat("\n") # # With zero government created liquidity in the economy # the growth rate goes to zero