Skip to content

Commit d4bc6ca

Browse files
Merge pull request #152 from HughParsonage/CRAN-1-7
Cran 1 7
2 parents 383c7a6 + 6d0aa62 commit d4bc6ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+413
-178
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: grattan
22
Type: Package
33
Title: Australian Tax Policy Analysis
44
Version: 1.7.0.0
5-
Date: 2018-08-19
5+
Date: 2018-10-16
66
Authors@R: c(person("Hugh", "Parsonage", role = c("aut", "cre"), email = "[email protected]"),
77
person("Tim", "Cameron", role = "aut"),
88
person("Brendan", "Coates", role = "aut"),

R/age_pension.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param fortnightly_income,annual_income Income for means-testing purposes. Provide one but not both.
44
#' @param has_partner (logical, default: \code{FALSE}) Does the individual have a partner?
5-
#' @param n_dependants How many dependants does sthe individual have? Default is zero.
5+
#' @param n_dependants How many dependants does the individual have? Default is zero.
66
#' @param partner_fortnightly_income,partner_annual_income The partner's income. The sum of this value and the indiviudal's income gives the income test.
77
#' @param partner_pensioner (logical, default: \code{TRUE}) Is the individual's partner also in receipt of the age pension?
88
#' @param Date,fy.year The financial year. Currently only 2015-16 is supported (the most recent survey of income and housing results).
@@ -14,7 +14,8 @@
1414
#'
1515
#' @details
1616
#' Currently does not include the age pension supplement.
17-
#' @return Returns the age pension payable for each individual defined by the arguments, assuming otherwise eligible.
17+
#' @return Returns the age pension payable for each individual defined by the
18+
#' arguments, assuming otherwise eligible.
1819
#'
1920
#'
2021
#'

R/child_care_subsidy.R

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
11
#' Child Care Subsidy paid per child.
22
#'
33
#' @param family_annual_income (numeric) Total income of the family.
4-
#' @param activity_level (numeric) The total number of activity hours of the parent. Note that if there are two parents the one with the lower activity level will be applied. Common activities include work, leave, and study. A full list can be viewed at \url{http://guides.dss.gov.au/family-assistance-guide/3/5/2/10}.
5-
#' @param activity_exemption (logical) Whether the parent is exempt from the activity test. Note that in a two parent family both parents must be exempt. A list of exemptions is available at \url{http://guides.dss.gov.au/family-assistance-guide/3/5/2/10}.
4+
#' @param activity_level (numeric) The total number of activity hours of the
5+
#' parent. Note that if there are two parents the one with the lower activity
6+
#' level will be applied. Common activities include work, leave, and study. A
7+
#' full list can be viewed at \url{http://guides.dss.gov.au/family-assistance-guide/3/5/2/10}.
8+
#' @param activity_exemption (logical) Whether the parent is exempt from the
9+
#' activity test. Note that in a two parent family both parents must be exempt.
10+
#' A list of exemptions is available at \url{http://guides.dss.gov.au/family-assistance-guide/3/5/2/10}.
611
#' @param child_age (numeric) The age of the child in child care.
7-
#' @param type_of_day_care (character) The type of child care. Acceptable inputs are: "cbdc" Centre Based Day Care, "oshc" Outside School Hours Care, "fdc" Family Day Care, or "ihc" In Home Care. Note that In Home Care can only be claimed once per family.
8-
#' @param hours_day_care_fortnight (numeric) The number of hours of day care per child per fortnight.
12+
#' @param type_of_day_care (character) The type of child care. Acceptable inputs
13+
#' are: \code{"cbdc"} Centre Based Day Care, "oshc" Outside School Hours Care,
14+
#' \code{"fdc"} Family Day Care, or
15+
#' \code{"ihc"} In Home Care. Note that In Home Care
16+
#' can only be claimed once per family.
17+
#' @param hours_day_care_fortnight (numeric) The number of hours of day care per
18+
#' child per fortnight.
919
#' @param cost_hour (numeric) The cost of day care per hour.
10-
#' @param early_education_program (logical) Whether the child is part of an early education program.
20+
#' @param early_education_program (logical) Whether the child is part of an
21+
#' early education program.
1122
#'
12-
#' @param cbdc_hourly_cap,fdc_hourly_cap,oshc_hourly_cap,ihc_hourly_cap (numeric) The lower of `cost_hour` or the relevant `hourly_cap` will be used in the calculation of the subsidy.
13-
#' @param annual_cap_income (numeric) The minimum family income for which the `annual_cap_subsidy` applies from.
14-
#' @param annual_cap_subsidy (numeric) Amount at which annual subsidies are capped for those who earn more than `annual_cap_income`.
23+
#' @param cbdc_hourly_cap,fdc_hourly_cap,oshc_hourly_cap,ihc_hourly_cap (numeric)
24+
#' The lower of `cost_hour` or the relevant `hourly_cap` will be used in the
25+
#' calculation of the subsidy.
26+
#' @param annual_cap_income (numeric) The minimum family income for which the
27+
#' `annual_cap_subsidy` applies from.
28+
#' @param annual_cap_subsidy (numeric) Amount at which annual subsidies are
29+
#' capped for those who earn more than `annual_cap_income`.
1530
#'
16-
#' @param activity_test_1_brackets (numeric vector) The activity levels at which the activity test increases.
17-
#' @param activity_test_1_hours (numeric vector) The hours corresponding to the step increase in `activity_test_1_brackets`.
31+
#' @param activity_test_1_brackets (numeric vector) The activity levels at which
32+
#' the activity test increases.
33+
#' @param activity_test_1_hours (numeric vector) The hours corresponding to the
34+
#' step increase in `activity_test_1_brackets`.
1835
#'
19-
#' @param income_test_bracket_1,income_test_bracket_2,income_test_bracket_3,income_test_bracket_4,income_test_bracket_5 (numeric) The steps at which income test 1 changes rates. Note the strange structure \url{https://www.humanservices.gov.au/individuals/services/centrelink/child-care-subsidy/payments/how-your-income-affects-it}.
20-
#' @param taper_1,taper_2,taper_3 (numeric) The proportion of the hourly cap retained. Note that the rate only decreases between each odd bracket.
36+
#' @param income_test_bracket_1,income_test_bracket_2,income_test_bracket_3,income_test_bracket_4,income_test_bracket_5 (numeric) The steps at which income test 1 changes rates.
37+
#' Note the strange structure \url{https://www.humanservices.gov.au/individuals/services/centrelink/child-care-subsidy/payments/how-your-income-affects-it}.
38+
#' @param taper_1,taper_2,taper_3 (numeric) The proportion of the hourly cap
39+
#' retained. Note that the rate only decreases between each odd bracket.
2140
#'
2241
#' @return The annual child care subsidy payable per child.
2342
#'

R/energy_supplement.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#' Energy supplement
2-
#' @description The ES is a supplementary payment that commenced on 20 September 2014. It was previously known as the clean energy supplement (CES). It is a fixed nominal amount; the supplement is neither indexed nor increased each year. There is no means testing.
2+
#' @description The energy supplement (ES) is a supplementary payment that
3+
#' commenced on 20 September 2014. It was previously known as the clean energy
4+
#' supplement (CES). It is a fixed nominal amount; the supplement is neither
5+
#' indexed nor increased each year. There is no means testing.
36
#' @param qualifying_payment A character vector designating the payment type the individual is entitled to. Valid strings are
47
#' \describe{
58
#' \item{pension}{All pensions and bereavement allowance}

R/family_tax_benefit.R

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,34 @@
22
#'
33
#' @param .data \code{data.table} input. Each row is an individual.
44
#' Columns must be have the same names
5-
#' @param id individual id
6-
#' @param id_hh household id, used to group households to determine eligiblity and number of children
5+
#' @param id individual identifier
6+
#' @param id_hh household identifier, used to group households to determine eligiblity
7+
#' and number of children
78
#' @param age numeric: age of each \code{id}
89
#' @param income numeric: income of each \code{id}
910
#' @param in_secondary_school logical column: does \code{id} attend secondary school?
1011
#' @param single_parent logical column: is \code{id} (a parent) single?
1112
#' @param other_allowance_benefit_or_pension logical column: does the individual receive a pension, benefit, or labour market program payment such as Youth Allowance?
1213
#' @param maintenance_income numeric: the amount of maintenance income the individual receives for the care of a child/children from a previous relationship
1314
#' @param maintenance_children integer: the number of children in the care of \code{id} for whom \code{id} receives maintenance
14-
#' @param income_test_ftbA_1_bound Lower bound for which reduction in ftb A max payment occurs at rate taper_ftbA_1.
15-
#' @param income_test_ftbA_2_bound Lower bound for which reduction in ftb A base payment occurs at rate taper_ftbA_1.
16-
#' @param income_test_ftbB_bound Lower bound for which reduction in ftb B payment occurs at rate taper_ftbB.
17-
#' @param taper_ftbA_1 The amount at which ftb A max payment is reduced for each dollar earned above income_test_ftbA_1_bound.
18-
#' @param taper_ftbA_2 The amount at which ftb A base payment is reduced for each dollar earned above income_test_ftbA_2_bound.
19-
#' @param taper_ftbB The amount at which ftb B payment is reduced for each dollar earned above income_test_ftbB_bound.
20-
#' @param per How often the payment will be made. At present payments can only be annually.
21-
#' @param copy (logical, default: \code{TRUE}) Should a copy of \code{.data} be made before the calculation?
22-
#' If \code{FALSE}, intermediate values will be assigned by reference to \code{.data} (if not \code{NULL}).
15+
#' @param income_test_ftbA_1_bound Lower bound for which reduction in FTB A max
16+
#' payment occurs at rate \code{taper_ftbA_1}.
17+
#' @param income_test_ftbA_2_bound Lower bound for which reduction in FTB A base
18+
#' payment occurs at rate \code{taper_ftbA_1}.
19+
#' @param income_test_ftbB_bound Lower bound for which reduction in FTB B payment
20+
#' occurs at rate \code{taper_ftbB}.
21+
#' @param taper_ftbA_1 The amount at which ftb A max payment is reduced for each
22+
#' dollar earned above \code{income_test_ftbA_1_bound}.
23+
#' @param taper_ftbA_2 The amount at which ftb A base payment is reduced for each
24+
#' dollar earned above \code{income_test_ftbA_2_bound}.
25+
#' @param taper_ftbB The amount at which ftb B payment is reduced for each dollar
26+
#' earned above \code{income_test_ftbB_bound}.
27+
#' @param per How often the payment will be made. At present, payments can only
28+
#' be annually.
29+
#' @param copy (logical, default: \code{TRUE}) Should a copy of \code{.data} be
30+
#' made before the calculation?
31+
#' If \code{FALSE}, intermediate values will be assigned by reference to
32+
#' \code{.data} (if not \code{NULL}).
2333
#' @author Matthew Katzen
2434
#' @export
2535
#'

R/fy.year.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' @param fy.yr A string suspected to be a financial year.
77
#' @param date A string or date for which the financial year is desired. Note that \code{yr2fy} does not check its argument is an integer.
88
#' @param assume1901_2100 For \code{yr2fy}, assume that \code{yr_ending} is between 1901 and 2100,
9-
#' for performance. By default, set to `getOption("grattan.assume1901_2100", TRUE)`.
9+
#' for performance. By default, set to \code{getOption("grattan.assume1901_2100", TRUE)}.
1010
#' @details The following forms are permitted: \code{2012-13}, \code{201213}, \code{2012 13}, only.
1111
#' However, the \code{2012-13} form is preferred and will improve performance.
1212
#'

R/newstart_allowance.R

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
#' Newstart allowance
22
#'
3-
#' @param fortnightly_income 'Ordinary income' received fortnightly within the meaning of s. 1068-G1 of the \emph{Social Security Act 1991}.
3+
#' @param fortnightly_income 'Ordinary income' received fortnightly within the
4+
#' meaning of s. 1068-G1 of the \emph{Social Security Act 1991}.
45
#' @param annual_income 'Ordinary income' received annually.
56
#' @param has_partner Does the individual have a partner?
67
#' @param partner_pensioner Does the partner receive a pension?
78
#' @param n_dependants How many dependant children does the individual have?
8-
#' @param nine_months If the person is over 60 years old, have they been receiving payments for over 9 continuous months?
9+
#' @param nine_months If the person is over 60 years old, have they been
10+
#' receiving payments for over 9 continuous months?
911
#' @param isjspceoalfofcoahodeoc Is the recipient a single job seeker principal carer, either of large family or foster child/ren, or who is a home or distance educator of child/ren?
10-
#' @param principal_carer Is the individual the parent with most of the day to day care of child. Defined in https://www.humanservices.gov.au/individuals/enablers/principal-carer-rules-parenting-payment/41456
12+
#' @param principal_carer Is the individual the parent with most of the day-to-day
13+
#' care of child. Defined in \url{https://www.humanservices.gov.au/individuals/enablers/principal-carer-rules-parenting-payment/41456}.
1114
#' @param fortnightly_partner_income Partner's 'Ordinary income' received fortnightly.
1215
#' @param annual_partner_income Partner's Ordinary income' received annually.
1316
#' @param age The individual's age.
1417
#' @param fy.year Financial year. Default is "2015-16".
15-
#' @param assets_value Total value of household assets. Details can be found at https://www.humanservices.gov.au/individuals/enablers/assets/30621
18+
#' @param assets_value Total value of household assets. Details can be found at
19+
#' \url{https://www.humanservices.gov.au/individuals/enablers/assets/30621}.
1620
#' @param homeowner Is the individual a homeowner?
17-
#' @param taper_lower The amount at which the payment is reduced for each dollar earned between the lower and upper bounds for non-principal carers.
18-
#' @param taper_upper The amount at which the payment is reduced for each dollar earned above the upper bound for non-principal carers.
19-
#' @param taper_principal_carer The amount at which the payment is reduced for each dollar earned above the lower bound for principal carers.
20-
#' @param lower Lower bound for which reduction in payment occurs at rate taper_lower (taper_principal_carer for principal carers).
21-
#' @param upper Upper bound for which reduction in payment occurs at rate taper_lower. Lower bound for which reduction in payment occurs at rate taper_upper. Note that for principal carers there is no upper bound.
22-
#' @param per Specifies the timeframe in which payments will be made. Can either take value "fortnight" or "annual".
21+
#' @param taper_lower The amount at which the payment is reduced for each dollar
22+
#' earned between the lower and upper bounds for non-principal carers.
23+
#' @param taper_upper The amount at which the payment is reduced for each dollar
24+
#' earned above the upper bound for non-principal carers.
25+
#' @param taper_principal_carer The amount at which the payment is reduced for
26+
#' each dollar earned above the lower bound for principal carers.
27+
#' @param lower Lower bound for which reduction in payment occurs at rate
28+
#' \code{taper_lower} (\code{taper_principal_carer} for principal carers).
29+
#' @param upper Upper bound for which reduction in payment occurs at rate
30+
#' \code{taper_lower}. Lower bound for which reduction in payment occurs at rate
31+
#' \code{taper_upper}. Note that for principal carers there is no upper bound.
32+
#' @param per Specifies the timeframe in which payments will be made.
33+
#' Can either take value "fortnight" or "annual".
2334
#' @source \url{http://classic.austlii.edu.au/au/legis/cth/consol_act/ssa1991186/s1068.html}
2435
#' @export newstart_allowance
2536

R/pension_supplement.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
#' @param Date Date. Default is "2016/03/01" if fy.year is not present.
1313
#' @param fy.year Financial year. Default is "2015-16" if Date is not present.
1414
#' @param qualifying_payment What is the payment that the supplement is being applied to?
15-
#' @param per How often the payment will be made. Default is to return the annual payment, with a messsage.
16-
#' @param overseas_absence Will the individual be living outside of Australia for more than 6 weeks of the upcoming year?
17-
#' @param seperated_couple Is the individual part of an illness separated couple, respite care couple, or partner imprisoned?
15+
#' @param per How often the payment will be made. Default is to return the annual
16+
#' payment, with a message.
17+
#' @param overseas_absence Will the individual be living outside of Australia
18+
#' for more than 6 weeks of the upcoming year?
19+
#' @param seperated_couple Is the individual part of an illness separated couple,
20+
#' respite care couple, or partner imprisoned?
1821
#'
1922
#' @author Matthew Katzen
2023
#' @export

R/rent_assistance.R

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#' Rent assistance
22
#' @description The rent assistance to each individual payable by financial year.
3-
#' @param fortnightly_rent The fortnightly rent paid by each individual. By default, infinity, so the maximum rent assistance is returned by default, since rent assistance is capped at a maximum rate. Note the criteria for board and lodging which can be found at \url{http://guides.dss.gov.au/guide-social-security-law/3/8/1/70}
4-
#' @param per Specifies the timeframe in which payments will be made. Can either take value "fortnight" or "annual".
5-
#' @param fy.year (character) The financial year over which rent assistance is to be calculated.
6-
#' When left as \code{NULL}, defaults to the user's financial year, unless \code{max_rate} and \code{min_rent} are both set. If \code{fy.year} is set, the annual payment is provided.
3+
#' @param fortnightly_rent The fortnightly rent paid by each individual. By
4+
#' default, infinity, so the maximum rent assistance is returned by default,
5+
#' since rent assistance is capped at a maximum rate. Note the criteria for board
6+
#' and lodging which can be found at \url{http://guides.dss.gov.au/guide-social-security-law/3/8/1/70}
7+
#' @param per Specifies the timeframe in which payments will be made. Can either
8+
#' take value "fortnight" or "annual".
9+
#' @param fy.year (character) The financial year over which rent assistance is
10+
#' to be calculated. When left as \code{NULL}, defaults to the user's financial
11+
#' year, unless \code{max_rate} and \code{min_rent} are both set. If
12+
#' \code{fy.year} is set, the annual payment is provided.
713
#' @param Date (Date vector or coercible to such) An alternative to \code{fy.year}.
814
#' If both \code{fy.year} and \code{Date} are provided, \code{fy.year} is ignored, with a warning.
915
#' If \code{Date} is used, the fortnightly rent assistance is provided.
@@ -17,8 +23,10 @@
1723
#' @param min_rent If not \code{NULL}, a numeric vector indicating for each individual the minimum fortnightly rent above which rent assistance is payable. \code{max_rate} and \code{min_rent} must not be used when \code{fy.year} is set.
1824
#'
1925
#' @param sharers_provision_applies (logical, default: FALSE) Does the sharers provision apply to the parent payment? The list of functions can be found in table 2 column 4 \url{http://guides.dss.gov.au/guide-social-security-law/3/8/1/10}
20-
#' @param is_homeowner (logical, default: FALSE) Does the individual own their own home?
21-
#' @param lives_in_sharehouse (logical, defualt: FALSE) Does the individual live in a sharehouse?
26+
#' @param is_homeowner (logical, default: \code{FALSE}) Does the individual own
27+
#' their own home?
28+
#' @param lives_in_sharehouse (logical, default: \code{FALSE}) Does the individual
29+
#' live in a sharehouse?
2230
#'
2331
#' @return If \code{fy.year} is used, the annual rent assistance payable for each individual;
2432
#' if \code{Date} is used, the \emph{fortnightly} rent assistance payable.

R/validate_date.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @description Many functions expect Dates.
44
#' Determining that they are validly entered is often quite
5-
#' computatationally costly, relative to the core calculations.
5+
#' computationally costly, relative to the core calculations.
66
#' These internal functions provide mechanisms to check validity
77
#' quickly, while still providing clear, accurate error messages.
88
#'

0 commit comments

Comments
 (0)