knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

mortgager

This package obtains various values such as monthly mortgage payment amounts, downpayment amounts, minimum income required for affordable home-ownership etc.

The formula used for calculating monthly home-ownership payment amounts is based on a widely accepted monthly mortgage formula, which here is adapted from that seen on the Nerdwallet website.

Mortgage Calculator Formula

Where:

In addition to the monthly mortgage payment, there are other costs associated with home-ownership which are then added to calculate total home-ownership costs, namely:

Installation

You can install the released version of mortgager with:

devtools::install_github("aseemdeodhar/mortgager")

mortgager

Load the \code{mortgager} package with this line:

library(mortgager)

Examples for each function:

mortgager::monthlypayment()

\code{monthlypayment} calculates monthly home-ownership costs based on tax rates, interest rates, downpayment rate, and home cost price.

monthlypayment(mortgage_rate = 3,
               property_tax = 12,
               downpayment_rate = .2,
               home_price = 450000)

mortgager::max_homeprice()

\code{max_homeprice} calculates maximum affordable home price based on annual income with a set monthly housing cost percentage (default is 30%).

max_homeprice(annualinc = c(61000, 75000, 22330, 120000),
              mortgage_rate = 2.7,
              property_tax = 6)

mortgager::downpayment_amt()

\code{downpayment_amt} calculates the total downpayment amount based on sale price and downpayment rate

downpayment_amt(home_price = 250000,
                downpayment_rate = 0.10)

mortgager::min_income()

Deprecated. Use reqd_income() instead, and specify monthly cost rate

\code{min_income} calculates the minimum annual income required for total housing costs to remain at or below 30% of household income.

min_income(2000)

mortgager::burd_income()

Deprecated. Use reqd_income() instead, and specify monthly cost rate

\code{burd_income} calculates the minimum annual income required for total housing costs to remain at or below 50% of household income.

burd_income(2000)

mortgager::reqd_income()

\code{reqd_income} calculates the minimum annual income required for total housing costs to remain at or below a set proportion of household income.

reqd_income(monthlypayment = 2000,
            housing_cost_rate = 0.30)


aseemdeodhar/mortgager documentation built on Jan. 28, 2021, 12:53 p.m.