Software

In my day-to-day work, I’m always looking out for things that can be improved. At work, ‘these things’ often mean code that I use for analysis. I really enjoy developing new R-packages that make life easier for other people and that implement new features that haven’t been easily available before. This website lists R-packages that I developed during my work but also in spare time. Don’t hesitate to send me an email if you happen to use one of them and want to share your thoughts.

JointFPM

R-CMD-check CRAN status Codecov test coverage

Recurrent events are common in medical research including, e.g., heart attacks, stroke or cancer relapses. One useful summary measure for this situations is the mean number of events at different time points. However, at the same time analyses is often complicated by competing events, i.e., events that prevent the event of interest from occurring. This is where the JointFPM packages comes in handy. The JointFPM packages implements a parametric model for estimating the mean number of events in the presence of competing risks. The package includes a function for fitting a joint model for the recurrent and competing event and a predict function that allows for predicting conditional as well as marginal estimates of the mean number of events and transformations there of.

CRAN GitHub Pkgdown

ExclusionTable

R-CMD-check CRAN status

ExclusionTable is a package for you who works with epidemiological research or other studies in which you need to apply certain inclusion and exclusion criteria to your study population. Instead of counting observations before and after a subset() call, the ExclusionTable() function reports the number before and after each subset() call together with the number of observations that have been excluded. This is especially useful in observational studies for keeping track how many observations have been excluded for each in-/ or exclusion criteria. You just need to provide ExclusionTable() with a dataset and a list of logical filter statements.

You can also find a blog post that showcases the use of ExclusionTabe here.

CRAN GitHub Pkgdown

TreeMineR

R-CMD-check CRANstatus Codecov test coverage

This package is an implementation of tree-based scan statistics, that I developed for one of my PhD studies. The function can be used to identify event clusters along a hierarchical tree. One use case could for instance be in pharmacovigilance for identifying clusters of adverse events along side the ICD tree. If you interested in how we use the TreeMineR package in our research, you can find our pre-registered analysis plan here.

GitHub Pkgdown

entjosR

R-CMD-check CRAN status

entjosR is a package which I use for storing some miscellaneous R functions that I often use in my daily work. The package includes some function that make it easier to create descriptive and result tables by combining R and Excel. Another function in the package that I use quite a bit is fpm_test_dfs(), which helps you to specify the degrees of freedom for a flexible parametric survival model. If you’re interested, you can also take a look at my blog article Testing degrees of freedom for generalised survival models in R, which demonstrates the use of the function.

GitHub Pkgdown