An exercise in non-linear modeling

Finding the right curve can be tricky. The image is CC by Martin Gommel.
Finding the right curve can be tricky. The image is CC by Martin Gommel.

In my previous post I wrote about the importance of age and why it is a good idea to try avoiding modeling it as a linear variable. In this post I will go through multiple options for (1) modeling non-linear effects in a linear regression setting, (2) benchmark the methods on a real dataset, and (3) look at how the non-linearities actually look. The post is based on the supplement in my article on age and health-related quality of life (HRQoL). Continue reading

flattr this!

Posted in R | 6 Comments

Does age matter for THR-outcomes?

Age is perhaps one of the most important confounder that none of us can escape. The image is CC by Sara.
Age is perhaps one of the most important confounder that none of us can escape. The image is CC by Sara.

Age is an important confounder in studying most health related outcomes [1, s 5], and perhaps the most commonly adjusted variable. In this and next post I will go into (1) what we know about the age effect in relation to total hip replacements (THR) re-operations and mortality, (2) what I found in my study on age and health-related quality of life (HRQoL) using splines, and (3) how I implemented and evaluated different splines using R for this study. Continue reading

flattr this!

Posted in Orthopaedic surgery, Research | Leave a comment

Fast-track publishing using the new R markdown – a tutorial and a quick look behind the scenes

The new rmarkdown revolution has started. The image is CC by Jonathan Cohen.
The new rmarkdown revolution has started. The image is CC by Jonathan Cohen.

The new R Markdown (rmarkdown-package) introduced in Rstudio 0.98.978 provides some neat features by combining the awesome knitr-package and the pandoc-system. The system allows for some neat simplifications of the fast-track-publishing (ftp) idea using so called formats. I’ve created a new package, the Grmd-package, with an extension to the html_document format, called the docx_document. The formatter allows an almost pain-free preparing of MS Word compatible web-pages.

In this post I’ll (1) give a tutorial on how to use the docx_document, (2) go behind the scenes of the new rmarkdown-package and RStudio ≥ 0.98.978, (3) show what problems currently exists when skipping some of the steps outlined in the tutorial. Continue reading

flattr this!

Posted in R, Tutorial | Tagged , | 7 Comments

My thesis: patient-related factors & hip arthroplasty outcomes

Title: Evaluation of patient related factors influencing outcomes after total hip replacement
Title: Evaluation of patient related factors influencing outcomes after total hip replacement

On May 29:th I successfully defended my thesis at the Karolinska Institute and I’m now a “Doctor of Philosophy“, i.e. PhD. It has been a fun and rewarding project that spurred me into starting this blog and diving into R. Below you can find the thesis abstract and my reflections on the subject. Continue reading

flattr this!

Posted in Orthopaedic surgery, Research | 3 Comments

Drawing a directed acyclic graph (DAG) for blood transfusions after surgery

A directed acyclic graph (DAG) can help you take the right path. The image is CC by Ian Sane
A DAG can help you take the right path. The image is CC by Ian Sane

I recently wrote about blood transfusions and their inherent risk of postoperative infections. This post is a tutorial on some of the basics of drawing a directed acyclic graph (DAG). Blood transfusions and infections is a great topic as most are familiar with risk factors for infections. Continue reading

flattr this!

Posted in General, Orthopaedic surgery, Research | Leave a comment

The final nail in the coffin for the degenerative meniscus?

Some studies give time for pause. The image is CC by Matt Katzenberger.
Some studies give time for pause. The image is CC by Matt Katzenberger.

I have my doubts when it comes to operating a degenerative meniscus (see my previous post) and in an amazing Finnish multicenter RCT it seems that my doubts have been confirmed. Sihvonen et al. managed to randomize 146 patients to arthroscopic meniscal or sham surgery where none of the outcomes differed between the groups. Continue reading

flattr this!

Posted in Orthopaedic surgery | Leave a comment

A bloody mess?

Do blood transfusions cause infections? The image is CC by Peter Almay.
Do blood transfusions cause infections? The image is CC by Peter Almay.

Blood transfusions lower the immune response – a known fact although not all doctors are aware of it. It is therefore nice to see that two new articles in JBJS that focus on the subject. Both focus on arthroplasties where the impact of an infection due to a lowered immune response can be catastrophic to the individual. Continue reading

flattr this!

Posted in Orthopaedic surgery | Leave a comment

Pimping your forest plot

A forest plot using different markers for the two groups
A forest plot using different markers for the two groups

In order to celebrate my Gmisc-package being on CRAN I decided to pimp up the forestplot2 function. I had a post on this subject and one of the suggestions I got from the comments was the ability to change the default box marker to something else. This idea had been in my mind for a while and I therefore put it into practice. Continue reading

flattr this!

Posted in R, Tutorial | 13 Comments

The rotator cuff dilemma – revisited

A black-shouldered kite with prey. The image is CC by Tariq Sani.
A black-shouldered kite with prey. The image is CC by Tariq Sani.

Is Kukkonen et. al.’s RCT the end of our love for the rotator cuff tear? The industry surrounding rotator cuff tears costs in the US alone about $3 billion every year, earning a top position among common orthopaedic procedures. I have previously written about my doubts concerning this procedure and it is with some satisfaction that I dive in to this recent study by Kukkonen et. al.

It is better to have loved and lost, than never to have loved at all.

Alfred Lord Tennyson

Continue reading

flattr this!

Posted in Orthopaedic surgery | Leave a comment