knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
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:
You can install the released version of mortgager with:
devtools::install_github("aseemdeodhar/mortgager")
Load the \code{mortgager} package with this line:
library(mortgager)
\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)
\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)
\code{downpayment_amt} calculates the total downpayment amount based on sale price and downpayment rate
downpayment_amt(home_price = 250000, downpayment_rate = 0.10)
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)
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)
\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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.