If anyone is interested in this possible project, feel free to use this thread to help make it happen.
Why wouldn't we just create packages on CRAN like actuar and ChainLadder? Unless you mean data repositories?
Hmm, data repositories, that's a good idea!
Possible answers to question 1 that come to mind:
- We may want to avoid cluttering CRAN with functionality only actuaries care about
- We may want to accept less stringent conditions on what passes muster
- Scare away fewer potential contributors while trying to get this bird to fly
- Eventual-CRAN-worthy packages could be peer reviewed by our group while under development
- We may want to restrict access
Fair enough.
What kinds of packages are being contemplated, realizing that Chainladder, actuar, ActuDistns and lifecontingencies are on Cran already.
Packages of casact R modeling tools, perhaps. E.g., I have algorithms that could benefit from review by our august group. I get the benefit of peer review and the group gets the benefit of what I've written, if it's useful. If no response, maybe it's not! :)
A couple of examples: One algorithm earns premium for an entire portfolio of policies across any increasing sequence of as-of dates. The other determines which of a table of reinsurance treaties applies to each claim in an entire portfolio. Both could be considered superfluous since one's company has long since determined those values — unless the actuary wants to model alternative possible universes. Both algorithms are one-liners (or nearly so). Both assume basic underlying principles and could be enhanced by the group, again if useful.
(For the treaties, here's a "Coverage Map" example of a company switching from "policies attaching" coverage to "claims occurring" and back again. … Oops, sorry, I can't post a picture.)
I think the ability to share code (with shared responsibility) is one of the many reasons people joined this committee. The committee could become "the author" of whatever set of functions prove useful in whatever set of packages are deemed appropriate. The committee could publish articles in, say, Forum, Actuarial Review, or online blog (?) discussing new functionality, applications, etc. becoming available. Algorithms could get translated, say from R to Python. I get the impression there are many "out there" who'd like to help in diverse ways.
Assuming we want to venture in this direction, my first predicament: where to post the code? I don't think the following is ideal :)
(algorithm 1)
require(plyr)
earnPremium <- function(data, asof)
as.matrix(
adply(.data = data,
.margins = 1,
.fun = function(x) diff(approxfun(c(x[["effectivedate"]], x[["expirationdate"]]), c(0, x[["writtenpremium"]]), rule = 2)(asof))
)[-(1:length(data))]
)
Does the CAS — or a committee member personally — want to sign up for one of github's free accounts?
I already created a Github repository with a knitr document for OSSC members to play with if they wish. If we are willing to license all our code as open source, then we can create a new repository and start playing.
If you want to look at an example R package's evolution, you can look at my Delaporte package's repository on Bitbucket. It's not going to match CRAN for a couple of days as I just pushed an update tonight.
Does that look like what you want?
We can start with just adding .R files, and when we think we have some critical mass, we can create a package. Thoughts?
You're a busy guy, Avi, updating your repository on Bitbucket while I watched!
I see your OSSCIntro repository but I don't know how to use it. Although I don't know knittr, I am familiar with version control (svn more than git) and R package development, familiar enough anyway to know that there are many difficult details to sharing development. (I must reference a manilla folder whenever I make changes to CRAN packages I support.) Do you have "instructions" for the OSSC? Also, how would you suggest our group decide on a license (good point)?
Neat; did you see the commit message? That's what happens when you build on 64bit :)
As for OSSCIntro, the way to make changes is to edit any of the documents, that will fork the project, and once you have completed your changes, you can send a pull request which would allow any maintainer to merge it into the main branch. If you let me know what your github ID is, I can add you so that you can commit the changes directly.
You will still need an R-MikTeX-knitr (and probably -Rstudio) setup to do it smoothly though. Do you have all those programs installed?
As for a license, it depends. That is also probably a topic for a new thread, and we may need to get some input from the CAS. Are we acting as representatives of the CAS or as volunteers in personal capacity? Not to forget that some of what we do we do for our employers and so act as "agents for hire" and they own the copyright.