Introduction

Let’s suppose that there is a family that has the following debts:

  1. 30-year fixed rate Mortgage with a balance of $256,957.00 at 9.83% interest
  2. Combined loans with a total balance of $145,528.00 at 9.47% interest to be paid over 15 years
  3. Combined credit cards with a total balance of $18,673.65 at 14.26% interest to be paid over 5 years

Using R, an amortization table will be produced for each of the 3 aforementioned debts. Lastly, the total debt and payments will be displayed in a table.



Debt Management and/or Reduction Strategies

What are some methods to deal with our debt(s)?

Please note: Just because a method is listed below, it does not mean that Irucka Embry believes that it is a wise strategy or not. Depending on whichever method that you may use, you may want to consult with a lawyer, a certified public accountant (CPA), a financial advisor/professional, a tax advisor, a life insurance agent, etc. depending on your (or your client’s) situation.

  1. Do nothing. Depending on the creditor(s), the debtor will end up in a civil court case. During the civil court case, you can still do nothing and receive a judgment against you. Or you can hire a lawyer or be a pro se defendant in the court case & challenge the whole lawsuit or parts thereof.
  2. Hire a lawyer or be a pro se litigant in a court case against the creditor(s) during the repayment period if there is/are (an) issue(s) with regards to contract law and/or other legal issues.
  3. Hire a lawyer or be a pro se litigant in a court case against the debt collector(s) after the debt has been assigned, sold, transferred, etc. to a debt collection agency if there is/are (an) issue(s) with regards to either federal and/or state laws regarding the collection of debts.
  4. Pay back the full principal and interest on schedule making the minimum payments [See the amortization tables on this Web page].
  5. Pay the smallest debt off first and then move forward in the same manner until all debt(s) are paid off (“the Snowball Method”).
  6. Pay down the debt(s) with the highest interest rate first and then move forward in the same manner until all debt(s) are paid off.
  7. Consolidate your debts into a single debt payment (consolidated loan) to hopefully reduce the interest rate thus reducing the amount of interest paid over time.
  8. Become a client of a company in the Debt Settlement industry.
  9. File a Chapter 7, 9, 11, 12, 13, or 15 Bankruptcy [See National Foundation for Credit Counseling (NFCC): The Different Chapters of Bankruptcy Explained — https://www.nfcc.org/blog/different-chapters-bankruptcy-explained/ for the descriptions of each chapter].
  10. Profit from your debt [See Make Money Off of Your Debt(s) — https://www.ecoccs.com/make-money-your-debts.html for information on choosing this strategy].
  11. Purchase a life insurance policy to pay your debt(s) at the end of your Life.



Replicate the R code

Install the packages

Note: If you wish to replicate the R code below, then you will need to copy and paste the following command in R first to make sure you have all the packages and their dependencies installed:


install.packages(c("data.table", "pander", "priceR", "DT"))
# install the packages and their dependencies (including any system
# dependencies)



Load the packages

Note: If you wish to replicate the R code below, then you will need to copy and paste the following commands in R first to make sure you have all the packages loaded:


# load the required packages
install.load::load_package("data.table", "pander", "priceR", "DT")
# load needed packages using the load_package function from the install.load
# package (it is assumed that you have already installed these packages)


# set the pander options
panderOptions("table.continues", "")
panderOptions("table.caption.prefix", "")
panderOptions("missing", "")



In the near future, the code from Source 1 will be incorporated into the amortization_calculator function that will be in a future release of iemisc (https://gitlab.com/iembry/iemisc).

Mortgage Amortization Table


# Debt Balances

mortgage <- 256957
loans <- 145528
credit_cards <- 18673.65

# Debt Interest Rates

mortgage_rate <- 9.83  # %
loan_rate <- 9.47  # %
credit_card_rate <- 14.26  # %

# create the amortization table using the amort function
mortgage_amortization <- amort(principal = mortgage, interest = mortgage_rate, duration = 30,
    payfreq = 1, firstpay = 1, compoundfreq = 1)

# create a data.table of the result
mortgage_amortization <- setDT(mortgage_amortization)

# change the column names
setnames(mortgage_amortization, c("Month", "Payment", "Total Paid", "Principal Balance"))

# copy mortgage_amortization to avoid potential issues in the last table
mortgage_amortizations <- copy(mortgage_amortization)

# add in the currency symbol for the last 3 columns
change <- c("Payment", "Total Paid", "Principal Balance")

for (col in change) {
    set(mortgage_amortizations, j = col, value = format_dollars(mortgage_amortizations[[col]],
        digits = 2))
    # Source 2
}

# print the table
datatable(mortgage_amortizations)