Dealing with non-proportional hazards in R

As things change over time so should our statistical models. The image is CC by Prad Prathivi(

As things change over time so should our statistical models. The image is CC by Prad Prathivi

Since I’m frequently working with large datasets and survival data I often find that the proportional hazards assumption for the Cox regressions doesn’t hold. In my most recent study on cardiovascular deaths after total hip arthroplasty the coefficient was close to zero when looking at the period between 5 and 21 years after surgery. Grambsch and Thernau’s test for non-proportionality hinted though of a problem and as I explored it there was a clear correlation between mortality and hip arthroplasty surgery. The effect increased over time, just as we had originally thought, see below figure. In this post I’ll try to show how I handle with non-proportional hazards in R. Continue reading

LMWH – a Big Pharma bluff?

Tales of Big Pharma Horror. The image is CC from Mike Licht.

Tales of Big Pharma Horror. The image is CC from Mike Licht.

Thromboprophylaxis is a given for patients operated due to lower limb injuries, at least if we believe Big Pharma-studies. This dogma is now challenged by a double-blind, multi-center, RCT by Selby et al. They found that the DVT rate was much lower than expected and had to pull the plug on the study as it would be practically impossible to show a difference between placebo and LMWH. Continue reading

R trends in 2015 (based on cranlogs)

What are the current tRends? The image is CC from coco + kelly.

What are the current tRends? The image is CC from coco + kelly.

It is always fun to look back and reflect on the past year. Inspired by Christoph Safferling’s post on top packages from published in 2015, I decided to have my own go at the top R trends of 2015. Contrary to Safferling’s post I’ll try to also (1) look at packages from previous years that hit the big league, (2) what top R coders we have in the community, and then (2) round-up with my own 2015-R-experience. Continue reading

Cuff surgery: Still no cigar

The degenerative cuff tear still unresolved. The image is CC by Brian

The degenerative cuff tear still unresolved. The image is CC by Brian

I’ve previously reported on Kukkonen et al’s excellent three-armed rotator cuff surgery RCT. They’ve now just published the 2-year follow-up where they still don’t see any difference in outcomes. Interestingly, they’ve added an MRI and noted that the cuff tear remains smaller among those that had surgery. This indicates that the intended surgery works but still too early to see any actual results. Continue reading

Canakinumab – difficult to pronounce but useful for treating gout?

Gout onset is sudden and be intensely painful. The image is CC by Mike

Gout onset is sudden and be intensely painful. The image is CC by Mike

Gout can be incredibly painful where the main treatment option are nonsteroidal anti-inflammatory drugs (NSAID). Unfortunately NSAIDs are not the best alternative for elderly patients as it may induce heart & kidney failure. I was therefore thrilled to see that canakinumab recently was approved by Läkemedelsverket as a treatment alternative. Continue reading

The proximal humerus fracture – a lost cause?

Time to give up on the proximal humerus fracture? The image is CC by Crouchy99.

Time to give up on the proximal humerus fracture? The image is CC by Crouchy99.

Most orthopaedic surgeons have met patients with poor shoulder function after a proximal humerus fracture, and many of us have thought: if I’ve only done the other thing I was thinking of…. Unfortunately the outcome seems to be independent of what we do, at least according to Launonen et al’s meta-analysis and Rangan et al’s recent RCT on 250 patients. Continue reading

A bloody mess

Is the evidence on blood transfusions going down the drain? The image is CC by  Steve Koukoulas.

Is the evidence on blood transfusions going down the drain? The image is CC by
Steve Koukoulas
.

In a recent RCT by Gregersen et al. they manage to complicate  blood transfusions in orthopaedic patients even further. They suggest that orthopaedic patients from nursing homes fare better with liberal blood transfusions (> 113 g/L compared to >97 g/L). The concept is interesting, although the paper has some issues. Continue reading

Stop (em)bracing burst fractures?

Jailbreaking spine fracture braces. The image is CC by Parée.

Jailbreaking spine fracture braces. The image is CC by Parée.

Continuing on the theme of #2MuchMed (see BMJ’s campaign) I figured it may be worth highlighting two recent studies on stable compression fractures of the spine. Both failed to show any benefit with standard bracing treatment. As some patients experience the brace as claustrophobic and uncomfortable (from my own patients’ experience), I’m thrilled to have this option available. Continue reading

End of the blood reign?

Will Carson et al's study be the garlic that deters the most blood thirsty colleagues? The image is CC by Gaviota Paseandera.

Will Carson et al.’s study be the garlic that deters the most blood thirsty colleagues? The image is CC by Gaviota Paseandera.

As I have a weakness for studies that challenge the dogma, I was ecstatic when I stumbled upon Carson et al.’s bold study on blood transfusions. In their study they selected 2000 patients with cardiovascular disease that were undergoing surgery due to hip fracture. Interestingly, there was no difference in 3-year mortality when randomizing between transfusion Hemoglobin thresholds of 100 g/L or 80 g/L! Continue reading

Benchmarking ReLU and PReLU using MNIST and Theano

The abilities of deep learning are fascinating, just as this Paschke arch CC by  David DeHetre

The abilities of deep learning are fascinating, just as this Paschke arch CC by David DeHetre

One of the successful insights to training neural networks has been the rectified linear unit, or short the ReLU, as a fast alternative to the traditional activation functions such as the sigmoid or the tanh. One of the major advantages of the simle ReLu is that it does not saturate at the upper end, thus the network is able to distinguish a poor answer from a really poor answer and correct accordingly.

A schematic of the PReLU. The PReLU has the same schematic with the only difference being the α being a constant. Curtesy PReLU article.

A schematic of the PReLU. The LReLU has the same schematic with the only difference being the α being a constant. Curtesy PReLU article.

A modification to the ReLU, the Leaky ReLU, that would not saturate in the opposite direction has been tested but did not help. Interestingly in a recent paper by the Microsoft© deep learning team, He et al. revisited the subject and introduced a Parametric ReLU, the PReLU, achieving superhuman performance on the imagenet. The PReLU learns the parameter α (alpha) and adjusts it through basic gradient descent.

In this tutorial I will benchmark a few different implementations of the ReLU and PReLU together with Theano. The benchmark test will be on the MNIST database, mostly for convenience. Continue reading