HughParsonage / grattan

Common quantitative tasks for Australian policy analysts
25 stars 8 forks source link

Rent Assistance #129

Closed MatthewKatzen closed 6 years ago

HughParsonage commented 6 years ago

What's the correct rent assistance for a single parent (with 0..4 children)?

library(grattan)
#> Last change: NAMESPACE at 2018-08-20 00:43:12 (11 mins ago).
rent_assistance(n_dependants = 0:4, has_partner = TRUE)
#> `fy.year` not set, so defaulting to fy.year = "2018-19"
#> `per` not set; calculating fortnightly payment.
#> [1] 128.00 159.58     NA 180.43     NA
MatthewKatzen commented 6 years ago

When something like the following is run: sample <- data.table(rent = 500, n_dependants = 0, has_partner = F, is_homeowner = F,lives_in_sharehouse = F) model_rent_assistance(sample, .Prop_rent_paid_by_RA = 0.8, return. = "new_ra") It will return the warning messages from running rent assistance twice as baseline_ra and ra: fy.year not set, so defaulting to fy.year = "2018-19" per not set; calculating fortnightly payment. fy.year not set, so defaulting to fy.year = "2018-19" per not set; calculating fortnightly payment. Should we suppressWarnings() around both and create new warnings in model_rent_assistance()?

HughParsonage commented 6 years ago

No should be an error: model rent assistance needs a financial year On Tue, 28 Aug 2018 at 12:26 pm, Matthew Katzen notifications@github.com wrote:

When something like the following is run: sample <- data.table(rent = 500, n_dependants = 0, has_partner = F, is_homeowner = F,lives_in_sharehouse = F) model_rent_assistance(sample, .Prop_rent_paid_by_RA = 0.8, return. = "new_ra") It will return the warning messages from running rent assistance twice as baseline_ra and ra: fy.year not set, so defaulting to fy.year = "2018-19" per not set; calculating fortnightly payment. fy.year not set, so defaulting to fy.year = "2018-19" per not set; calculating fortnightly payment. Should we suppressWarnings() around both and create new warnings in model_rent_assistance()?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/pull/129#issuecomment-416429874, or mute the thread https://github.com/notifications/unsubscribe-auth/AHvGDPiO9Mr_VpwR4LsWv9eZxGdRDWXkks5uVKpMgaJpZM4V7y5N .

MatthewKatzen commented 6 years ago

Then how would you like the baseline_Date to be handled? i.e. should it return an error if neither baseline_Date nor baseline_fy are set?

HughParsonage commented 6 years ago

Yes: error unless exactly one is set.

MatthewKatzen commented 6 years ago

Failing that data up-to-date test. Can you have a look at that @HughParsonage

MatthewKatzen commented 6 years ago

Can't figure out why the tests are failing but are working fine on my computer.

HughParsonage commented 6 years ago

Error in the rent assistance example On Wed, 29 Aug 2018 at 11:28 am, Matthew Katzen notifications@github.com wrote:

Can't figure out why the tests are failing but are working fine on my computer.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/pull/129#issuecomment-416792671, or mute the thread https://github.com/notifications/unsubscribe-auth/AHvGDKSQBX-VWugvXcVWZIYZrOIvXtruks5uVe41gaJpZM4V7y5N .