Monday, 3 December 2012

Varicella pays a call

Chicken pox arrived this week. Of course P had been playing with her best friend nearly non-stop during the 1-2 days before the spots appeared. She was infectious, but we didn't know it yet. We're still waiting for him to get feverish, but it's only a matter of time: varicella is highly contagious -- approx. 90% of those exposed will get the disease. Which seems a rather amazing statistic given the number of times I've heard about chicken pox parties that apparently didn't work. Hopefully he will only suffer the same mild case she had - about 50 spots that didn't particularly bother her.

Public health policy for chickenpox in the US and the UK is completely different. It seems that the difference lies in consideration of the long term effects on the entire population, and on the adult reactivation of chicken pox virus known as shingles, or Herpes Zoster. Well, there might be some other issues, too. Basically, the UK seems to be waiting and watching the outcomes of the US vaccination program over time.[3] So far it's a success, but the questions were about what happens 30-50 years into the program, so there's some waiting yet to be done.

I'm no expert, but here's what I know of the story: The varicella vaccine was developed in the 1970's and first licensed in Japan in the 1980's. A full vaccine program in the US began 1995, several years after my 4-year-old sister brought the virus home from nursery and shared it with me. I spread it to the local high school. The severity of the disease goes up with age of first exposure, so, while my sister and most of her nursery class got off with a mild fever and a handful of itchy spots, I was pretty miserable for over a week, and one of my friends was out of school for three weeks. Before the US program started, there were an estimated 4 million cases of chicken pox each year. For every 100,000 cases in teenagers, approximately 216 would end up in hospital, and 6 would die.[1]

Since it's beginnings in 1995, the vaccine program has grown so that school systems in 46 states now require vaccination for entry, and some nurseries and day care centers do, too. Current vaccine coverage is estimated at 94%. The program has been touted as a great success for reducing the number of hospitalizations, serious complications, and deaths due to the virus. There were an estimated 100-150 deaths every year before the program was started. The childhood deaths are now nearly eliminated, and the adult deaths are also reduced. The program has also saved a lot of money and hassle for parents who would have otherwise stayed home from work to look after sick children. The estimated savings is on the order of $500 million annually.[1]

So why isn't there a similar program in the UK?

Well, firstly, there do seem to be some hiccups. The vaccine is not as long-lasting as hoped, and there is a 'breakthrough' disease rate, in which children who have been immunized catch the disease anyway. The claim is that these cases are less severe than they might otherwise have been... although it is difficult to know. The rate of hospital visits does seem to be lower. The disease incidence is reported to be reduced by 83%, and the hospitalizations by 88%. Anyway, the original 1-dose vaccine program was changed to a 2-dose program beginning in 2006 to reduce the disease burden in the 7-14 year old age group. The price of the vaccine is also higher than the original cost-benefit analyses estimated. It's currently at about $80/dose. Which seems high, but frankly, it would have been worth $80 for my daughter not to miss a week of school. Maybe even $160. But if you ask if it is worth $160 to have a 60% chance that she will not miss the week of school, well, things start getting complicated, don't they?

And then there's shingles. According to the US CDC:
"Although many people do not remember, approximately 99.5% of people born in the United States who are 40 years of age and older have had varicella. As a result, all older adults in the United States are at risk for herpes zoster."

People like me, who have had full-blown chicken pox, have latent virus in our nerve ganglia. About 90% got it before the age of 10, when the initial infection was not too serious a disease. Our immune systems can fight this virus and keep it dormant. Occasionally, however, we might have a flare-up, which would be called shingles, also known as Herpes zoster, or just plain zoster. If you have heard of shingles, you've probably heard something like 'intensely painful' in the same breath. In older adults, the pain can last for months (as postherpetic neuralgia or HPN), and feels like your nerves are on fire.  I've never had it, and I don't want it. Actually, it's the kind of thing you would only wish on your worst enemy.

It's not entirely clear what causes shingles, but it only happens in people who had chicken pox, and it is more common in people with weakened immune systems, especially over age 50. According to some reports, if people susceptible to shingles are exposed to the live chicken pox virus, the immune system boosts its defenses against the virus, pushing the next bout of shingles into the distant future. On the other hand, someone with an active shingles rash can spread the virus to non-immune people, who then develop chicken pox.

The US CDC estimates there are about 1 million shingles cases each year, with 10 cases/ 1000 adults over 60. Between 1 and 4% of these will be hospitalized. Overall , Americans who live to be 85 years old have a 50% chance of suffering a bout of shingles. The incidence of shingles has been on the rise in the US, but apparently the rise goes back to before 1995, so cannot be entirely due to the vaccination program. The CDC states that there is no evidence the vaccination program has increased the rate of shingles. Nevertheless, the NHS in the UK lists a possible rise in shingles cases as the main argument against a varicella vaccination program.

Great stuff. To model the effects of a vaccine program, we would need to model this complicated viral transmission system, including years of latency in which the virus is inactive. The frequency of re-exposure to the virus plays a part in the dormancy period and reactivation rate of shingles. The cell-mediated immunity seems to be an important factor, and this varies in different life stages. To predict the effects would require a good model for social contact between, say, school children, babies and grandparents. School and nursery settings are the main places where the disease is spread, and there is a marked seasonal variation corresponding with the school year.

What can we predict about introducing a vaccine?

Well, firstly, the number of cases of the disease will decline. The direct societal costs of the disease will go down. (Success!) The number of people exposed to the virus will also decline. Some of those  will develop shingles because their immune systems did not get the boost provided by community exposure to the virus. Shingles goes up. (Failure!) However... time goes by. Eventually, those people who were immunized grow up and are not susceptible to shingles (success!). Only, not according to the CDC, which says that shingles can occur in anyone who has had the chicken pox virus, whether via the illness or through vaccination. (Failure!) But... people who have been vaccinated are 'less likely' to develop shingles. So if you get immunized and live to 85 years old, your chances of suffering a bout of shingles go from 50% for a wild-type case to 22% for immunization... maybe. Are you confused yet? Basically, there isn't a lot of data available to understand this part. A lot depends on how the susceptibility to both 'breakthrough' chicken pox and to shingles changes over time in people who received the vaccine.

Normally, adults who get chicken pox for the first time suffer a 10x greater rate of complications than children. Many more end up in hospital and with more serious complications. Hopefully, the immunity provided by the vaccine will be sufficient to avoid many cases in adults, but it is too early to tell. We would have to know how the immunity provided by the vaccine evolves over time. And since it was only licensed in 1995, we just don't know that yet. As far as anyone knows, the immunity seems to last somewhere between 6 and 20 years in different people, but it's difficult to measure, because exposure to someone who actually has the disease boosts the immunity. For some people at least, booster shots may be needed.

Anyway, varicella virus is making it's way through the local neighborhood. Neighbors are discussing 'pox parties' and the differences between immunity through vaccination vs wild-type disease. I can't turn back the clock on either myself or my kids, and I don't think the arguments for vaccination are entirely clear because the long-term effects are not known. I prefer to believe that my immunity will continue to last through my adult life, and I won't need a booster. Thankfully, no one in my family has suffered significant consequences from the wild-type chicken pox disease. It doesn't seem severe to me, so I am not unhappy about the NHS decision to hold off on a universal vaccine program.

References:
[1]  Zhou F, Ortega-Sanchez IR, Guris D, Shefer A, Lieu T, Seward JF.  An economic analysis of the universal varicella vaccination program in the United States. J Infect Dis. 2008 Mar 1;197 Suppl 2:S156-64.

[2] http://www.cdc.gov/shingles/hcp/clinical-overview.html  Updated: Oct. 23, 2012. Retrieved: Dec. 3, 2012.

[3] P D Welsby, Chickenpox, chickenpox vaccination, and shingles, Postgrad Med J. 2006 May; 82(967): 351–352. doi:  10.1136/pgmj.2005.038984 PMCID: PMC2563790
[4] Lieu TA, Cochi SL, Black SB, Halloran ME, Shinefield HR, Holmes SJ, et al. Cost effectiveness of a routine varicella program for US children. JAMA 1994; 271: 375-81.doi:10.1001/jama.1994.03510290057037Note: This analysis relied on a $35 cost for the vaccine, which is far below the $80 cost for a single shot, much less the $160 for the two shots now required in most areas.
[5] Susan A. Galea, Ann Sweet, Paul Beninger, Sharon P. Steinberg, Philip S. LaRussa, Anne A. Gershon, and Robert G. Sharrar, The Safety Profile of Varicella Vaccine: A 10-Year Review
 J Infect Dis. 197 (Supplement 2): S165-S169. doi: 10.1086/522125

Wednesday, 7 November 2012

Creativity in the Web Lab

A few weeks ago, we had an extra hour in South Kensington , so we popped into the Science Museum, and G noticed a poster for the new Google Chrome WebLab (beta). This post is a basic overview of the lab, however, raises some interesting issues about privacy. I'll cover that aspect in a separate post.

The Web Lab is set up in a section of the basement that used to have an interactive gallery for ages 6+. It was moved up to the top floor about 5 years ago and renamed 'LaunchPad'. So this region of the museum used to be heavily used by school groups, with many interactive stations where kids could cooperate and learn about sound transmission, levers, bridge engineering, waves, light pipes, etc. It was smaller and dingier than the current 'Launch Pad' space, and it was always jam packed and deafening. Now it houses the Google Chrome Web Lab.

The concept for the Web Lab is that there are several interactive stations, and gallery visitors interact with online visitors through the exhibits. There's an overlying invitation to create, to collaborate, to experience the world via the connectivity provided by the web. It's an interesting idea, but isn't that... Facebook? Maker.com? Wikipedia? YouTube? IRC? GitHub? The phenomenon of people interacting over the web seems ubiquitous. Which doesn't mean it isn't a good subject for a museum gallery...
Universal Orchestra xylophone
In the Universal Orchestra experiment, a museum visitor controls the timing and notes hit by the xylophone robot. The tempo and dynamics are automated, so there is a continuous rhythm that doesn't vary a lot. Online visitors and museum visitors simultaneously control the instruments through similar interfaces. Together they create a musical texture. The interface is absolutely brilliant, with dots representing each possible note. I suspect that musicians would find it very limiting, but it was just right for my 9-year old. The user drags red blobs around the screen, placing them on the dots to sound a note. This is fun, but there are only three stations in the Lab, and only one person can interact with each station. Maximum onsite museum users: 3. Visitors from the web... uh, I think it's 3, too, but Web Lab is a Chrome invention.  It doesn't collaborate with Firefox. 

Other interactives:
Sketchbot
These are lovely, but I'm not sure about 'creative' or interactive. The museum visitor stands in front of a webcam. The computer takes a picture, automatically identifies a face, processes the image by rotating, leveling, finding edges and vectorizing to create a rough drawing. The sketchbot draws the vector path in a sandbox which is constantly rotating, swiping out old sketches in the process. Some sketchbots are available over the web. Five or six are in the museum. Creativity? none. Standing in front of a camera is not creative.

Teleporter
Look through the viewer at the 360° webcam installed in a world famous 24hr bakery half a world away. Um. OK. I don't smell the bread, and there isn't even any control of the camera view. Disappointing. Viewing is not interacting. There are two teleporter stations available to museum visitors. One visitor at a time, please.

Data tracker
Search for something on the web, trace back to find the latitude and longitude of where it is actually stored. Creative? Informative, maybe, but a limited search for a specific iota of information is not really creative. When it is the necessary connector in a search to solve a problem, it might be, but not when there is so much external control over the possibilities.

The bottom line:
We spent 30 minutes. The kids had a good time with the touchscreen interface for the online orchestra, which was very well done. The music was pretty good, and we did interact with a couple of people in the museum while doing this. Another mother and child laughing at controlling a snare drum robot. Good.

Creative content? low. 
We spend a lot of time in museums and we occasionally have discussions about what works and what doesn't. Currently, the Web Lab doesn't work very well for the visitor. The wait for the sketchbot processing and drawing meant that there was no way of really 'playing' with it. There was no way to even make a paper sketch of a face. There were no mustaches to wear for your portrait. The kids watched the technology do it's thing.

Scope for interaction: poor. Although this is supposed to be a collaborative environment, the only place where collaboration seemed possible was in the Universal Orchestra. And there it was through the sound scape. The number of people who could interact was limited by the number of instruments available (fewer than 10 in total, and only half that for museum visitors). Stations available for interaction over the web were frequently not being used.

Use of space: bad. The large gallery has a rather small number of interactive stations, and there is little means for interacting with other museum visitors. So this looks like a pretty poor use of museum space, with little educational or creative value. The orchestra is successful because it allows simultaneous interaction, which all participants and listeners can enjoy. Even there, though, the number of visitors who can actually participate is far too low to justify the use of space.

Maybe the Chrome team will be able to learn from the process and make improvements on the beta environment. Right now the most engaging bits are the Universal Orchestra interface and music can the friendly unique ID's, including the nice flowing graphic at the entrance. The rest of the lab is very much beta. 

Update: My son visited again with his scout group over half term break. There was a '30 minute' wait for the web lab. By all reports, G enjoyed demonstrating the sketchbots to his friends. He didn't think that the gallery was particularly crowded when they got in, so I suspect that the numbers are controlled because of the limited number of interaction stations.



Tuesday, 23 October 2012

Coursera: Data Programming in R, post II

I've finished my course work for Computing for Data Analysis, on Coursera, so I thought I'd take the time do do a quick review.

Overall:
I'm glad I took the course. A structured learning timeline with specific targets and an active discussion board is very valuable. It's far better than learning in isolation through random web tutorials and linked resources. 

The course is not for everyone:
 If you haven't done any programming, R is not a good first language. This course will not be a friendly introduction to programming. In particular, R is quirky and the command syntax is difficult to read. Many commands have similar names, but subtly different behaviors.  The help files are opaque and the examples frequently esoteric. The R programming environment lacks some very basic coding tools such as code completion, although these are probably available in other environments such as R-Studio or ESS.  If you want to learn basic programming, take a course in Python.

R will be a lot easier to digest if you are comfortable with statistics or matrix algebra, can read mathematical notation without difficulty, and have done a bit of programming. If you want flexible data analysis and publication quality output from free software, you'll be very happy. Most of what you want to do can be done with the core functions of R. It's probably best to learn what they can do before reaching for a package. This may save a lot of time later on when the package gets superseded by another one. The core of R will still be there, unchanged. That said, R appears to have a pretty good package management system, so incorporating packages that rely on packages seems to work very well.

If you are coming from an object oriented language such as Java, Ruby or C++, the scoping rules are a leetle different. This seems to be very powerful when used well, but it's mind bending. I haven't really managed to bend my mind around this one enough yet.

Level of the course: 
It would definitely help to have some programming and problem solving background going in. Students needed good problem solving to do the exercises. The basics of the language were taught in Powerpoint slides. The information in the videos was enough to get through the quizzes, but the exercises required more: R-help, R-bloggers, stackoverflow were very useful. 
There was very little discussion of speed optimisation or the tradeoffs in using different programming approaches in R. The final exercise could be solved with for loops, and judging by the forums, many students resorted to them. There was no penalty for this in the grading. The exercises, however were thoughtfully put together, and did provide a good platform for learning to leverage the language, with a little creativity and perseverance. 

There was an introduction to the differences between S3 and S4 classes, but no discussion of more advanced technologies such as refactoring, unit testing, version control, or documentation. I saw one reference to software carpentry on the forums, but there was no reference to how to incorporate these methods in R specifically. Function prototypes were provided for the exercises, and these included useful comments, setting a good standard. However, there was no mention of Runit (testing, TDD), Git (version control), or .Rd files or Roxygen (creating documentation). So if you want to learn how to incorporate these into your work with R, don't look here.  

Time Commitment: 
The course website suggests 2-4 hours / week. I was able to fit the video viewing and exercises into that time frame, on the outside. I spent an extra couple of hours reading and commenting on the forums and looking further / honing more satisfying solutions to the exercises.

What next?
R is quirky. I won't remember much of what I learned beyond a month or two at most. There is clearly a steep learning curve here, and thus a big difference between introduction, competence, and mastery.  At this point, I've had an introduction. In order to progress, I'll need some projects to work on.  

Resources for the future:
... which is just a tiny tip of the iceberg. Let me know about more in the comments.


Tuesday, 2 October 2012

Spirograph mania!

According to RetroWow, among other sources, Spirograph was invented by Denys Fisher in 1965. It was first intended as a drafting tool, but was marketed as a toy. There were multiple versions, and there is a modern remake from Hasbro.

 We've tried out three versions. The new version didn't stay in the house. It was too difficult to use because the gears kept slipping underneath the outer template. The pocket version shown below works OK, but the designs are somewhat limited (no epitrochoids). The antique Kenner version is our favorite. This is getting a lot of use right now. It's great at 8 or 9 years old and up, but your six year old would have to be very adept with a pen to enjoy it for long.
Mom! Can I get out the Spirograph?

The old pens were dry, so I did get a wonderful set of Stabilos, which are working perfectly. The pens need to be narrow enough to fit through the holes in the gears. Felt tips are a bit softer than roller balls, so they don't seem to make holes in the paper as easily, although the ink sometimes runs a bit.

Once you do a few patterns, it's nice to be able to predict what the wheels will do. There is a handy chart on the inside of the box lid, but the math is rather fun, too. We're not quite up to common denominators and gear ratios yet, but predicting the number of points on a spirograph pattern will be a good tool when we get there:
  • Outer wheel: 96 teeth
  • Inner wheel: 60 teeth
  • Step 1: Factor the number of teeth
    • 96 = 32 x 3 = 2 x 2 x 2 x 2 x 2 x 3
    • 60 = 20 x 3 = 5 x 2 x 3
  • Step 2: Compare the numbers. Find factors that are the same.
    • 96 = 32 x 3 = 2 x 2 x 2 x 2 x 2 x 3
    • 60 = 10 x 6 = 5 x 2 x 2 x 3
  • Step 3: Calculate the largest common denominator:
    • = 2 x 2 x 3 = 12
  • Step 4: Divide the number of teeth by the LCD to get the gear ratio:
    • 96 / 12 = 8, 
    • 60 / 12 = 5 
    • for a gear ratio of 8/5
    So it will take 5 round trips inside of the larger wheel to create a pattern with 8 points.
    When the circle is rotated around the inside of the fixed circle, as in this pattern, the result is called a hypotrochoid. 'Hypo' is a commonly used Greek root for 'under' or 'inner' as in hypoglycaemia for low blood sugar and hypoxia for lack of oxygen. If the inner circle is fixed and the outer one is rotated, the pattern is an epitrochoid. I think of 'epi' as a Greek root meaning 'surface' or 'outer' as in the medical name for the outer skin - epidermis.

    Of course these geometric forms have equations which can be used to describe them. And these equations have been implemented as interactive demos on the web. I don't find these as much fun as the physical drawing. Partly this is because the process of drawing a hypotrochoid is rather pleasant loopy-loop feeling. Also, though, the restriction to an integer number of teeth on the gears makes for a restriction on the variety of patterns. As in flowers, we don't really notice that number of petals is restricted to a multiple of 2, 3, or 5. We just find it pleasing.

    Sunday, 30 September 2012

    Learning Some R

    I'm following the free course: Programming for Data analysis, taught by Roger D. Peng of Johns Hopkins Bloomberg School of Public Health, and the Simply Statistics blog. It's offered through Coursera.org.

    I should be over-prepared for this course. It's supposed to be completely introductory, with only limited programming or statistics background required, but I'm interested in learning R. So this provides an interesting introduction where I can find out about MOOC's and how they work. My latest app update is 'waiting for review' on iTunes, so I should be able to find a couple hours a week to put into it. 

    The first week's lectures covered downloading and installing R, how to get help, some basic data types and selecting data from vectors, lists, etc. Data input and output. Although this is a programming class, the lectures were presented as slide-decks with voice-over. The slides could be downloaded as pdf, and translations were available as subtitles. Each slide had 2-5 sentences with some information about an R command, possibly including an example. I found this easy to follow, but low on information density. I listened to the lectures while making cupcakes for a bakesale. Then I increased the speed to 1.5x. I'll get more from referring to the pdf slides while doing the exercises.

    There were no suggestions for outside materials, although some resources were referred to in the 'getting help' lecture video. 

    Some 30,000+ students have apparently signed up for the course. The discussion board has several pages worth of questions. The introduce - yourself thread has the most views with nearly 5000. The other most popular threads have 1100 views or so at this point, so there is quite a bit of activity. Several of the "students" are already quite accomplished with R, and they are posting visualizations and code. This is a great learning resource. The rest of us are trying to share resources we find on the web:

    Links to free R resources


    It's not clear how many students will make it through the 1st quiz, much less the 1st assignment, but complaints on the discussion forum are significant, and are mostly coming from people without much programming background. Since the 1st assignment is not due until the end of week 2, the 1st week's lectures did not cover all the relevant material, many students feeling lost. The 'Not sure where to start…" thread has 2100 views. It would be nice if the 1st lectures were designed to allow you to get started writing code. That's not really necessary to get started using R, but it is necessary to do the course. Fortunately, the boards are monitored, and the lectures for the 2nd week were released a bit early to help with this. 

    I do wish the lectures had a more theoretical founding. This is one of my pet peeves about unix world in general, although I don't think I'm alone. Nothing seems to ever be related to anything else. Although there is a full lecture on the history of R, it goes through where R was developed, who developed it, but not what it's theoretical bases were or why it was made the way it was. With every language there are underlying assumptions about what forms of data are important and how it should be saved and treated. Understanding these can make learning and using the language much easier. No such luck here. Is read.table fundamental? How does it relate to read in unix or C or other common languages of the early R days? This seems like arcane knowledge, but it is the kind of thing that forms an actual education. If programming languages aren't taught as isolated functions and control characters, but as a historical web of intellectual developments, students have a framework for learning. I'm not sure Professor Peng, as a statistician, has this framework himself (it isn't encouraged outside of liberal arts schools), so I'm probably just shouting into the wind. 

    If you are used to learning in a classroom, the MOOC may seem very unusual. It is somewhere between independent learning and actually going to class. So far, the materials presented in the lecture have not been enough to even get full marks on the 1st quiz. (There's a gotcha about vector recycling in R which will not be apparent unless you either know it already, get lucky, or try it at the R command line.) The best way to learn is probably to have the R command line open and try things out during lecture. Even using the command line is not made easy, however, because the lectures are not structured as problem, discussion, resolution, but rather as a list of things you might find useful. You have to come up with the examples yourself, and most people will need outside help. 

    So, many students are pooling expertise on the discussion forum to figure it out. This includes posts that benchmark possible solutions, and a lot of hints on how to get started. The great majority of answers are helpful and supportive. Perusing the forum will make the assignments doable. 

    So overall, I'm not particularly impressed with the lecture style or structure of the teaching and information. On the other hand, I'm impressed with the breadth of the emerging student community. The assignments are challenging, and the outcome should be a reasonably good understanding. This learning won't come from the lectures, though. In other words, follow the excellent suggestions on how to succeed in a MOOC

    And if you think that my complaints must be unique to this course, try looking at this blog post