Saturday 10 May 2014

INR management - the Goldilocks Dose

Since getting a mechanical heart valve (in Nov 2011) I have naturally had to deal with life on a drug called Warfarin. This is known variously by people as its 'corporate product names' like: Marevan or Coumadin. They are essentially the same thing.

I self monitor with a Roche Coaguchek XS (at the time of writing) and am very happy to have the freedom to do so (unlike many in the USA who are slaved to their medical insurance). Self management is becoming as accepted for INR as it already is for diabetics (and can you imagine asking a diabetic now to go to a lab for daily blood samples?).

Just like anything; too much will cause you problems, too little does nothing. So there is a dose which is juuuust right - I call that the Goldilocks Dosage.

Sadly this dose is elusive for many and in reality is a bit of a shifting goal post, but then in reality so too is management of your insulin levels if you happen to be a diabetic.

Quick Summary

I have found a way of using my collected data to make better dose estimations. In short for myself I have found (by examining my data) that I can expect the following INR (on average) ranges as a response to my consistent daily dose of warfarin:

dose mg 7 7.5 8 8.4
MAX INR 3.19 3.14 3.64 3.87
Average INR 2.43 2.60 2.77 2.95
MIN INR 1.82 1.95 2.08 2.21

What is this and what does it mean and how did I determine this? Well the answer is perhaps more complex, so if this is interesting to you then read on ....

Background

One of the great benefits of INR self management is that you can monitor more frequently, this is very helpful in learning about your own metabolic response to warfarin, and indeed not only does it vary from person to person, but varies within a person at various times. Indeed this variance in metabolism and INR responce is what causes problems with gaining the maximum benefits from warfarin and avoiding the dangers.

Basically the INR is the goal and working out the dosing of warfarin is the method of getting yourself to that goal.

In the past the goal INR was given as a range, however a new way of thinking about it is emerging in the literature, which is to simply have a 'target' INR and grasp the idea that consistency of dose is good and values too high increase your problems as do values too low. You can expect your INR to move around, as long as it stays within the window there is nothing to worry about.

To me the new method is wiser because for a start nothing stays in one place (least of all metabolism) and the reality is a continuum not a border. You will not suddenly burst if you go over a threshold (low or high) and so the idea of the range is a little misleading and (in my view) can encourage silly and wrong approaches: IE my Dr said my INR range was 2 ~ 3 so I'm going to sit on 2. This is dangerous because the reality is that you can't sit on 2, you'll dip low and increase your risk of a stroke.

My Data and statistics

Before I go on much more I thought I'd present my INR data from 2013


so from this you can see that my INR varied between 1.9 and 3.3, but the vast majority of the time was between those levels (but as you see always changing). I occasionally read of people complaining of their INR not settling and wonder if they imagine their INR level should somehow be more static, like a line of bricks?

Anyway, in the analysis of this some understanding of stats comes in handy, don't worry its not going to get complex. Basically my average INR was 2.5 (which is exactly the target that the new European Guidelines suggest) with a Standard Deviation of 0.3 (which means that if my INR was away from 2.5 it was mostly within ±0.3 of that; meaning between 2.2 or 2.8). Meaning I'm doing an OK job of managing my INR.

However I always like to understand things more, so I have been doing some data analysis on my data (and I have quite a bit) and have come up with an interesting model which I believe at the very least helps to understand my INR responce better.

Metabolism and Models


I like to model things, and maths (computers) make modelling quite convenient. My experience in modelling is that there are simple models and complex models. The literature on modelling suggests that more complex models may prove more accurate, but if not highly tuned with (accurate) parameters will produce quite unreliable results.

Simple models are never going to be as accurate, but as they require far less tuning they are less likely to be wildly inaccurate than a badly tuned complex model. So may actually be more valuable. So I set about to work out a model to allow me to see things other than INR and dose. I call this Metabolism.

Basically one's body gets rid of Warfarin as quickly as it can. In the main this is by the cytochrome P450 pathway (but lets not get into that here) in a reasonably consistent manner. The measure of this is its "half life" (which people probably know from radiation physics, but it is equally used in biochemistry too). Of course this half life is probably not going to be consistent from person to person or even perhaps within a person from day to day.  The half life of warfarin in a person varies from between 20 to 60 hours. So I decided for simplicity to pick 48 hours (two days) as a nice easy basis for a start. There will be variations (it is after all a living system).

Further, the level of Warfarin is not an absolute indicator for this, as INR is about the clotting ratio and the manner of action of Warfarin is to inhibit the recycling of Vitamin K in the body (which in turn influences clotting). So its really a push this which shoves that sort of thing and there is some slop in the mechanism (buffering for want of a better word).

 So to try to make things consistent I decided that I would simplify the entire bundle of
  • diet (Vitamin K intake),
  • exersize (effects on metabolism),
  • warfarin intake
  • misc metabolic changes
into one single factor called by me as "M".

As you may guess its not something which lends itself to being predictable (and that is not my intention for it). My intention is to assist me to grasp things by reducing my variables from many to two - Metabolism and Warfarin dose. As already mentioned simple models are at least less likely to be screamingly wrong and this is a simple model.

The model works by taking the standard half life accumulation over a total of 4 days as its a simple number to work with and the amounts of residual warfarin left from a dose will be quite low by then (and hence of reduced significance overall). Then with a stabilised dose (I choose a week of the same dose as stability) one can apply the "M" factor (a simple scalar) to this 'standardised warfarin accumulation' to then give the INR which was measured.

That's right, its based on Empirical observation, as I said, it is not predictive in itself.

So with the last two years of data at hand I put this into the model and found that my "M" varied between 6.15 and 10.78 Now I can plug these numbers into another simple "what if" calculation spread sheet and work out a worst case and best case INR for various stabilised doses.


This is the data from my table at the start of the blog post.

So I can at a glance see that a daily dose of anything from 7 to 8.5mg of warfarin will on average give me an INR between 2.43 and 2.95 ... which would be excellent. However only if my M remains at exactly my median level (which it does not). If I were to pick a dose of (say) 8.5mg then (assuming swings in my M) my INR could be anywhere between 2.21 and 3.87 - which is only a little over my surgeons initial theraputic range instructions (which were 2.2 ~ 3).

Further, I can now look at my "M" statistics and see what its MAX MIN and Std Dev are and make reasonably accurate estimations of the likelyhood of being in what range.

As you probably know (hey, a pun) a Std Dev normal bell curve represents likelyhoods for "normally distributed data". So I can apply this now to my Metabolism figures and work out reasonable scenarios.

I've already given my observed MAX and MIN values for M (10.78 and 6.15) and my Average was 8.08 with a Std Dev of 1.19 ... So from this I can say that within ±1 StdDev of my average Metabolism the doses of 7, 7.5, 8 and 8.5 give:


7mg 7.5mg 8mg 8.5mg
+1 StdDev = 9.27 2.11 2.27 2.42 2.57
-1 StdDev = 6.88 2.85 3.05 3.25 3.46


Which suggests that for "most of the time" my dose could be anywhere in this range and be OK most of the time. Now using this knowledge I can now work out
  • a plain and simple dose which will keep me from going low (and risking clots) but accepting highs (and knowing how high they may be)
  • what (if any) adjustments I wish to make without resorting to guess work (like guessing how by how much I should change my dose by)
  • understanding how long I'm likely to be low for and or high for
which is quite helpful stuff.

Discussion

This supports the variety of attitudes which exist "out in the wild" of INR management. It supports what many find of "once stabilised don't vary the dose much" while at the same time gives some support to the view that "you should only adjust in small amounts if going out of range". I now use the 2 week moving average on my Metabolism (rather than on the INR which I used previously to developing this, and to be honest I'm still tracking both) to see if my trend is going low or going high.

The astute observer will by now noticed that lower INR is associated with higher M. This is because my M is measure of the rate at which the body clears the warfarin (that interferes with Vitamin K recyclingand restablishes coagulatoin . High clearance gives less warfarin in the body and the less warfarin in the system the lower the INR is.


If we go back to my 2013 data set you can actually see that there are definitely trends in my metabolism (best seen in the 2 week moving average). Its possible (if you keep records on a spreadsheet with a graph) to now observe these trends and make them easier to both see and understand.

I think its important to also mention that while cyclic, they do not necessarily (or even is it likely) follow a simple sine wave. Just like looking at some simple regular cycles of different frequency we see an overall effect which is unlike each component. For instance this animated graphic showing the combination of a few frequencies (wave lengths) may make this clearer.

Some parts will be diet, some will be health, some may be other 'cyclic' metabolic trends in the body.

Again I emphasize this is not about prediction of where the INR will be but estimation of where its likely to be within.

The importance of being regular

Lastly just like one's morning movements regularity is good stuff. I disagree with the notions of alternated doses, if for no other reason that they make it unclear exactly what your residual warfarin levels will be at any given time (adding more complexity to analysis at the very least). I know that some people say that a dose change takes a few days to even out, and then use this to justify taking 5 on 3 days per week and 7 on others ... to me that's just setting up even more irregular cycles which you just don't know what will be the result of. For instance changing the dose higher is likely to trigger the mitochondria to deliver a greater enzymatic dose (warfarin is metabolized by cytochromes P450 (CYP1A2 CYP3A4, CYP2C9))  to remove the toxin, and will this then cause the following lower dose to be removed faster. Not a good idea.

Every time I read of some poor bastard having their INR swing all out of control (dangerous stuff) its usually always associated with a bungling clinic varying the doses all over the place.

If you are interested in this process then I encourage you to keep regular records and measure at least weekly. Another myth is that INR does not respond to a dose change for days. Bullshit. I have personally observed (with daily measurement on occasions) the results of going off warfarin (for surgery and oops, missed a dose) and seeing how it changed substantially on a day by day basis.

Data quality is the important thing, there are people who say that you don't need to sample INR more than monthly ... clearly this is a gross misunderstanding looking at my data. Probably daily samples would be ideal for analysis, but in my experience every 3 days is as fine a granularity as really matters (and yes, I've done daily sampling, every 2 days sampling, twice weekly sampling and weekly sampling).

where to next?

Well it is my intention to develop some software to allow people to mange their data in a way that makes it simple : you input your INR readings, the software then preserves that and allows you to look at various analysis of this. I hope this will provide an easy method for people to store and chart their INR and enable them to keep accurate records.

Lets see how my life allows me time for that in the coming year...

Best Wishes

PS: There have been (via different channels) a few requests to contact me about this work. If you would like to email me to discuss this please feel free to me at:

Wednesday 7 May 2014

Head Fi (Fanny style)

Seems that King Wang has a niece, called Fanny.

She makes a range of headphones it seems


so, get your head into a Fanny - Wang style

But at $300 a set, Fanny doesn't come cheap ...

(you just can't make shit like this up)

Tuesday 6 May 2014

Generations - GH1 vs E-M5

Every now and then I wonder about my choices in life (and my camera gear choices too), so with a recent visit to the UK to see a friend I took the opportunity to compare his Olympus OM-D E-M5 with my Panasonic GH1.

Quick Summary

Depending on where you stand the outcomes of my exploration show that either:
  • not much change (almost none) don't upgrade just for better images {or if you have nothing now and want to dip your toe into micro4/3 then buy a used GH1 for peanuts}
  • bucket loads of image quality development and the E-M5 is a truly great camera
To make sence of these opposite views a perspective that matters is which side of the RAW vs JPG divide you stand on.

I prefer to use RAW and then have the capacity to work with the digital version of a negative as I wish. I can't think of a renoun photographer from the film days who preferred to use Polaroid (unless they were after an effect). To me RAW offers the capacity to (at least) recover from oopsies (like forgetting to change white balance) as well as allowing me to bring forward my images captured years ago into the future as higher quality post-processing comes around. Were I to use JPGs (as I did for many years before RAW was even available) then my images would essentially be stuck in the past quality standards.

My phone now does for many images where I just want a quick and snappy shot (and is often better than my Point and Shoot camera)[or is that PoS camera?].

What I did and found

One of the things camera makers have been doing for a while is iteratively smartening up their JPG engines and dailing in more parameters into that processing such as knowledge of the lens (to fix its design shortcomings) aperture and focal length. Compared to just a few years ago the differences of 'out of the camera' images are chalk and cheese.

It also happened that I wanted to see what my Pentax 110 70mm f2.8 (legacy) lens looked like on the OM-D (to see if any difference was observable). This as it turns out is also a helpful lens to use as the camera has no knowledge of it and therefore can't do anything dreadfully cunning (but still does amazingly good things to the JPGs).

So lets look at overviews:
JPG from the GH1

JPG from the OM-D

Clearly no two cameras (by make and model) produce exactly the same images all other things being equal, however even at these sizes its perhaps clear to you that the OM-D image has an edge. If we zoom in a fair amount (not 100% pixels, but 50%) its even clearer. GH1 on the left OM-D on the right.


The OM-D image just leaps off the screen as being sharper and more contrasty, better handling of colour and tone and captures the elusive small bits of RED often missed by cameras (look for the red new growth leaves towards the stems of the plants). The Panasonic GH1 by contrast looks murky and flat. You may also notice a small variance in feature size, this is because the OM-D is 16Mpixels and the GH1 12MPixels. It is at least to me bugger all difference.

So, if you have zero interest in RAW (and you are sure you will never have an interest in RAW) then that's it, the newer camera makes better images out of the box. No need to read more

however

.. if you don't want to have to use bracketing for white balance, bracketing for "film type" (isn't that a laugh of a name) and generally want to do more things with your image, lets follow the white rabbit a bit further.

The first thing I did was convert the images with DCRAW (to avoid any fancy processing just yet) and just did a plain convert using dcraw -w -T -g 2.4 12.92 to get an sRGB gamma and use the camera white balance. Suddenly the stunning differences vanished, in fact I was totally unable to get an image from the GH1 RAW file which was as shitty as the camera JPG (good one Panasonic)

The differences just vanished more or less immediately.

Panasonic on the right this time (just to keep you observing)...

Seems like there is really bugger all differences between the data captured by the cameras when presented this way. If anything I reckon the GH1 has a slightly better amount of actual data (when looking at the data dump) than the OM-D does.

I noted that the highlights of the leaves (for instance) were not as well handled in the plain RAW conversions, so its clear that more cunning processing is done in camera than just a straight demosiac.

So, from there I thought I'd try to do some cunning tricks myself in software and using a few filters and some adaptive masking, this is what I got when I applied that to the GH1 (on the left) vs the camera JPG from the OM-D.


Which now closes the gap between the OM-D camera JPG and the GH1 RAW. Personally I actually prefer the processed GH1 image, but then that could be the maker bias ;-)

Processing was quite simple actually, it was just run through Photomatix to add a wee bit of adaptive masking then sharpening mask was added twice (once at 0.9 pixel radius and again at 25 pixel radius). I now see better bokeh from my lens too! The white clover flowers in the background grass had nearly vanished in the OM-D image.

That image for comparison with the OM-D


I encourage you to open them in their own tabs (center button mouse click works in Firefox on a PC) ad see what you think.

For reference the OM-D image was processed in the same manner and got this:


Conclusion

If what moves you is images and you are unafraid to (or even tempted to) process the data yourself, then my view is that Panasonic got the hardware right back then nearly 5 years ago, and that Olympus has only just now caught up. If you have a GH1 (or newer Panasonic) I see no compelling case to upgrade camera to improve image quality unless you use JPG from the GH1 and are unwilling to learn about image processing. To me the OM-D does not make a worthwhile case for upgrade of my 4 year old camera which is a little tragic if you ask me. As an aside, this reminds me of the concept of software by subscription. Back in the 90's when I was doing my Software Engineering degree we were taught about the idea of don't sell software lease it. This allows the company to get a better income stream by forcing upgrades on the clients (delivered in subscription form). In some ways I see a parallel here in that by getting owners to purchase new cameras to get better images they are essentially combining the best of buy VS lease. So while the GH1 data output is so good it enables the user to take advantage of software to really tune their output the newer camera produces better OOC JPG's.

I see no significant developments in sensors (also covered recently in noise areas) and (as a commenter suggested) the only developments are in processing. Looking at the physics and electronics I see little real chances for sensor improvements and I think there will be few developments in processing to take us past here. The low hanging fruit has been picked and pretty much all the makers are now equal.

As to other issues, I was totally unimpressed by the operation of the Oly, and feel that the dolts who developed the camera should go buy an OM-1 and hold it and use it ... back in the 1970's Oly made great cameras which were easy to use and felt good. I still have and love my OM-1 ... I can't say I feel that way about the OM-D (but that's another blog post).

Sunday 4 May 2014

The Great Delvin

Growing up in Australia, I listened to my Grandmothers Irish accent with a mixture of amusement and confusion (just what was it she said then?). When I was young my Grandmothers sister Hannah visited us, I don't recall the exact date, but it was sometime about 1977 IIRC.

Grandma left home young, so naturally when she left she lost touch with the family back in Ireland. I understand there was no correspondence between her and home for many decades, so it was almost as if she had died.

Then through the massive changes of modern communications she got in touch with her sisters and her sister Hannah came to visit us. It must have been such a great thing that today we can barely imagine it.

Hannah brought with her a copy of her book "The Great Delvin" (which I have still). I grew up seeing this book as a treasure of the family and I was occasionally allowed to handle it (my Grandmother treasured it). Most memorable to me were the images of the historical buildings of significance in the township: St Marys and the Delvin Castle.

Last week I had the opportunity to visit Delvin where Grandma grew up, to walk the streets and see the places she knew.

In Hannah Fitzsimons's book the images were in gritty black and white, clearly (to my eye as a photographer today) taken with 35mm and processed into book form in ways which showed why larger formats were preferred in the day.  So in a nod to that style allow me to share the images of my "home coming" back to Delvin.

The Castle (and right beside it St Marys Church) it seems come from some time around 1184. I read that it was burned down because Cromwell had intended to occupy it after sacking Trim. It was instantly recognizable to me as I turned the corner into the villiage.



Walking up the hill towards it was somehow like walking into a novel, that such novel was actually an historical account of my family made it all the more powerful.

Walking past the Castle one can see its back (or is it front?) and some (I assume) much more recent structures built onto it.


and some degradation of the stone walls. Its remarkable that such things can stand for almost a thousand years.


Walking past the castle I approached St Marys. At first, I walked around the outside grounds (which were locked) and decided to walk into the pub for information. The keeper told me that the Newsagent had the key and so I went to him to ask and started chatting. It seems my Great Aunt is well known in Delvin. He gave me the key and I opened the steel gates to enter the grounds.

I didn't photograph from the front of St Marys, I guess because I was too preoccupied with the many thoughts which were in my mind at the time. But after I pushed open the steel gates leading into the church and sat my pack down I gathered my thoughts and took out my camera to document what I had just seen.


The gate I walked through is clear in the middle left, and seeing the steeple from inside was a reminder of images I'd seen in my Great Aunts book, clearly this is where that photographer was standing.

A doorway into the steeple seemed to have been blocked off and broken though, so I thought I'd have a look inside.


The walls were covered in moss and some of the rock wall plastering was falling off. There was a small stair case leading part way up to the top, but it was blocked. Perhaps there was also long ago a wooden structure inside for access, as there were rocks visible to support such a structure.

Standing at the base of the tower (on the road side of the church) some of the exterior walls remain remarkably well preserved.


However since it has had its roof removed (and also it seems, been de-consecrated) the plants have had a better time at eroding the sunny side of the interior.





The sunny side (the graveyard side) of the wall (with the steeple base just visible on the LHS top)


I understand that St Marys was in use up until it was "de-consecrated" in the 1970's which would put it at right about the time Hannah visited us. The Parish currently uses this much more modern building.


Reviewing my thoughts from the day, and seeing things differently now that it is not the first time, it emerges there are things I wish to revisit there. I am sure I will have to go back there again.

I hope you enjoyed this quick tour too.

:-)