-
Notifications
You must be signed in to change notification settings - Fork 14
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
Pace & Shape #47
Comments
I am OK with that. Adding this extra functionality will be awesome! |
Awesome, I would love to have shape functions in Rage! Perhaps the
|
Does the curve in question always have finite limits? and would midpoint rule approximations be acceptably accurate? If yes to both, then I think it could be written using just base R. On the other hand, I have no idea if Pace and Shape metrics satisfy both requirements above ;) |
Depends how you want to do it. The curves will always be simple life-table-type-things (lx for sure, and some fertility analogue to lx that we've developed). They should always have evenly spaced categories for x, but in theory don't have to. Area under curve is an exact measure assuming constant mortality / fertility within discrete intervals, midpoint... I don't know. I didn't immediately turn to integration as the data aren't functions, but the stats option might work. I'll take a look... would be preferable to having so many dependencies. I can compare the results to the ones I get from area under curve. |
If you assume a constant rate of change over discrete intervals, then I think
Though this example assumes a constant rate of change in lx within intervals rather than a constant hazard within intervals, per se. |
Good point. In that case it becomes a question of whether we want to support only evenly spaced intervals or some more funky things. Life tables should never be mahoosive, so to be honest I might just write my own function which calculates the area: it's just a bunch of different size trapezoids... |
...which is equivalent to a bunch of different size rectangles, I guess! |
@iainmstott Can you update me with the status of your pace/shape functions? |
Hi all
I'm currently working on my fork adding Pace & Shape measurements to
Rage
that Annette Baudisch and I have been developing; if we want, these can eventually be incorporated into the package itself (alongside other more standard ones we'll either have or would make sense, e.g. life expectancy, Keyfitz Delta, Gini).For the new measures (which [humble brag] if I say so myself are more generalisable and comparable than many other shape measures), I need to calculate area under a curve. The only function I know of (
MESS::auc
) has a lot of dependencies at 10 or more. I wanna either ask whether people are OK with this, or whether they know of a lighter option (or want to press me to find one), if indeed these measures would be useful in the package eventually.The text was updated successfully, but these errors were encountered: