PgivenA {iemisc} | R Documentation |
Present value given Annual value (Engineering Economics)
Description
Compute P given A
Usage
PgivenA(
A,
n,
i,
frequency = c("annual", "semiannual", "quarter", "bimonth", "month", "daily")
)
PA(
A,
n,
i,
frequency = c("annual", "semiannual", "quarter", "bimonth", "month", "daily")
)
Arguments
A |
numeric vector that contains the annual value(s) |
n |
numeric vector that contains the period value(s) |
i |
numeric vector that contains the interest rate(s) as a percent |
frequency |
character vector that contains the frequency used to obtain the number of periods [annual (1), semiannual (2), quarter (4), bimonth (6), month (12), daily (365)] |
Details
P is expressed as
P = A\left[\frac{\left(1 + i\right)^n - 1}{i\left(1 + i\right)^n}\right]
- P
the "present equivalent"
- A
the "uniform series amount (occurs at the end of each interest period)"
- i
the "effective interest rate per interest period"
- n
the "number of interest periods"
Value
PgivenA numeric vector that contains the present value(s) rounded to 2 decimal places
PA data.table of both n (0 to n) and the resulting present values rounded to 2 decimal places
Author(s)
Irucka Embry
Source
r - Convert column classes in data.table - Stack Overflow answered by Matt Dowle on Dec 27 2013. See https://stackoverflow.com/questions/7813578/convert-column-classes-in-data-table.
r - foreach loop not replicating traditional loop - Stack Overflow answered by F. Privé on Oct 19 2019. See https://stackoverflow.com/questions/58459665/r-foreach-loop-not-replicating-traditional-loop.
References
William G. Sullivan, Elin M. Wicks, and C. Patrick Koelling, Engineering Economy, Fourteenth Edition, Upper Saddle River, New Jersey: Pearson/Prentice Hall, 2009, page 133-134, 142, 164.
Dave Bruns, Exceljet: "Calculate original loan amount", https://exceljet.net/formulas/calculate-original-loan-amount.
Examples
library(iemisc)
# Example 1 -- Example 4-9 from the Sullivan Reference text (page 133-134)
PgivenA(A = 20000, n = 5, i = 15, frequency = "annual") # the interest rate is 15%
PA(20000, 5, 15, "annual") # the interest rate is 15%
# Example 2
PgivenA(A = 93.22, n = 5, i = 4.50, frequency = "month")
# Using LibreOffice Calc 6.1.5.2 version
# A1 4.50%
# A2 -93.22
# A3 60
# A4 12
# A5 =PV(A1/A4,A3,A2) = $5,000.26