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 package with this line:
library(mortgager)
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)
#> [1] 2051.108
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)
#> # A tibble: 4 x 4
#> income_level atincome at80pc at120pc
#> <dbl> <dbl> <dbl> <dbl>
#> 1 61000 224144. 179316. 268973.
#> 2 75000 278561. 222849. 334273.
#> 3 22330 73838. 59070. 88606.
#> 4 120000 453471. 362777. 544166.
calculates the total downpayment amount based on sale price and downpayment rate
downpayment_amt(home_price = 250000,
downpayment_rate = 0.10)
#> [1] 25000
Deprecated. Use reqd_income() instead, and specify monthly cost rate
calculates the minimum annual income required for total housing costs to remain at or below 30% of household income.
min_income(2000)
#> [1] 80000
Deprecated. Use reqd_income() instead, and specify monthly cost rate
calculates the minimum annual income required for total housing costs to remain at or below 50% of household income.
burd_income(2000)
#> [1] 48000
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)
#> [1] 80000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.