Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trim option to marginal rate computation #350

Merged
merged 1 commit into from
Oct 21, 2015
Merged

Conversation

benjello
Copy link
Member

No description provided.

@benjello
Copy link
Member Author

@adrienpacifico: you can use this to trim the large marginal rate you may hit because of nonlinearities like seuil de non versement and kinks.
@cbenz you can merge this with no impact for other openfisca users

@adrienpacifico
Copy link
Contributor

@benjello
Thanx a lot. I did not try your trim function.
To deal with that I'm currently using a smoothing function that gives the average value between n-1 and n+1 element of the array if the variation is too large.

What should be the typical value of your trim parameter ?

@benjello
Copy link
Member Author

trim is a list of two elements. The marginal rates that are higher than the max of these two parameters or less than the min are converted to nan and thus not appear in the plots.

@adrienpacifico
Copy link
Contributor

Thanx for you answer.
It solves big arterfacts that are higher than a given value (due to threshold, kinks, etc). But it doesn't solve my fat lines issues :-) (as reported in #349).

I need to find a good way to deal with that, other than reducing the number of observations :-).
(désolé je me sers un peu de cet espace comme si c'était un canard en plastique).

P.s : you might want to put a docstring for the function such that ones know that trim is supposed to be a two element array/list/tupple/whatever else.

@benjello
Copy link
Member Author

Your problem is due to rounding. Reduce the number of points.

Le sam. 10 oct. 2015 16:44, adrienpacifico [email protected] a
écrit :

Thanx for you answer.
It solves big arterfacts that are higher than a given value (due to
threshold, kinks, etc). But it doesn't solve my fat lines issues :-) (as
reported in #349 #349
).

I need to find a good way to deal with that, other than reducing the
number of observations :-).
(désolé je me sers un peu de cet espace comme si c'était un canard en
plastique).

P.s : you might want to put a docstring for the function such that ones
know that trim is supposed to be a two element array/list/tupple/whatever
else.


Reply to this email directly or view it on GitHub
#350 (comment)
.

@adrienpacifico
Copy link
Contributor

Yes I know I've been trying to do something a bit more fancy today, it's
not working perfectly but it's still something to improve.
Le 10 oct. 2015 18:21, "Mahdi Ben Jelloul" [email protected] a
écrit :

Your problem is due to rounding. Reduce the number of points.

Le sam. 10 oct. 2015 16:44, adrienpacifico [email protected] a
écrit :

Thanx for you answer.
It solves big arterfacts that are higher than a given value (due to
threshold, kinks, etc). But it doesn't solve my fat lines issues :-) (as
reported in #349 <#349

).

I need to find a good way to deal with that, other than reducing the
number of observations :-).
(désolé je me sers un peu de cet espace comme si c'était un canard en
plastique).

P.s : you might want to put a docstring for the function such that ones
know that trim is supposed to be a two element array/list/tupple/whatever
else.


Reply to this email directly or view it on GitHub
<
#350 (comment)

.


Reply to this email directly or view it on GitHub
#350 (comment)
.

@benjello
Copy link
Member Author

@cbenz, you can merge this without trouble

cbenz added a commit that referenced this pull request Oct 21, 2015
Add trim option to marginal rate computation
@cbenz cbenz merged commit 9106181 into openfisca:next Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants