Is R turning into an operating system?

Over the years I convinced my colleagues and IT guys that LaTeX/XeLaTeX is the way forward to produce lots of customer reports with individual data, charts, analysis and text. Success! But of course the operating system in the office is still MS Windows.

With my background in Solaris/Linux/Mac OSX I am still a little bit lost in the Windows world, when I have to do such simple tasks as finding and replacing a string in lots of files. Apparently the acronym is FART (find and replace text).

So, what to you do without your beloved command line tools and admin rights? Eventually you start using R instead. So here is my little work-around for replacing "Merry Christmas" with "Happy New Year" in lots of files:

for( f in filenames ){

x <- readLines(f)
y <- gsub( "Merry Christmas", "Happy New Year", x )
cat(y, file=f, sep="\n")

}
You can find a complete self-contained example on github.

Of course R is not an operating system, but yet it can complement it well, if your other resources are limited.

Last but not least: Happy New Year!

Clear As Mud

When is selling not selling? Where is the line between helping your customer and primarily helping yourself? Determining that becomes harder each day.

One of my clients needed to talk. She had received a disturbing phone call at her home and wanted to know if she had handled it correctly and if I knew the back story. Mary (not her real name) was contacted by a national pharmacy. We’ll call the pharmacy chain Mega Rx. Mary was advised that her insurer would no longer cover medications for her and her family from their local Mega Rx. Since they knew that Mary would hate to loose access to Mega Rx, they would be happy to connect her to someone who could help her find an insurance policy that would allow her to retain them. All she had to do was stay on the line. Mary thanked them but said that she already had an agent and hung up.

Think about this for a second. The national drug store chain had fought and lost a battle with a national insurer. They were mining their records for anyone who had that insurer and had had a prescription filled in the last year or so. And if Mary was gullible and not paying attention, she might have somehow been talked into different insurance that would have definitely covered Mega Rx, but might not have covered her doctor, or given her and her family the same level of coverage.

The appointment to change individual health insurance policies usually takes an hour in my office and involves a lot more than whether or not Mega Rx is in the network. This silliness is taking place under our current set of rules. The states and the federal government are still writing the new rules. Some people don’t think we really need licensed agents. Why not let anyone sell insurance?

I just spent twenty minutes completing my application to renew my license to sell life and health insurance. I had to prove that I had completed 21 hours of continuing education and 3 additional hours of ethics training in the last two years. I actually had a total of 42. That does not include the 7 to 9 hours per year for Medicare products or the mandatory additional training for long term care coverage. I then attested that I haven’t been convicted of any crimes, haven’t had my insurance license suspended or revoked, and that I don’t owe back child support. This is true. You can not sell insurance in the State of Ohio if you owe back child support. I paid my $5 and I should get an approval notice some time next week.

All states have seen a value in licensing insurance agents. It is obvious that one value of the requirements is to weed out the part-timers. The public is better served by committed professionals who are willing to take the time and effort to stay current. And though insurance agents (me included) will never be confused with rocket scientist, we do serve an important function in the market as we help the insured public acquire coverage and navigate the process to get the most from their contracts. The insurers long ago (begrudgingly) accepted our value.

This brings us to the Patient Protection and Affordable Care Act (PPACA). The authors of this legislation did not believe that the public is capable of calling an insurance agent or company or shopping online to purchase health insurance. Since finding health insurance was so difficult, insurance exchanges, a marketplace, would be created in each state. As you can see from the Obama administration’s website, the exchanges, an additional layer of bureaucracy, is going to save you money. And how will you get to the exchange and who is going to help you choose the right type of policy for you? That would be the Navigators.

The PPACA is pretty sure that almost anyone that can fog a mirror is capable of doing my job. Any employee of trade association or union can walk you through the process. In fact, the PPACA spends more time on the notion that the Navigators can not be compensated by the insurers than it does on training or qualifications.

A well publicized letter from David M. Casey, Senior Vice President of MAXIMUS, a company that specializes in Medicaid enrollment, details the Patient Protection and Affordable Care Act’s aversion to professional insurance agents.

John Doak, the Oklahoma Insurance Commissioner, is succinct in his judgment. He has consistently challenged the federal government’s intrusion into insurance regulation and health insurance. He has asked what kind of training the Navigators will have in insurance products, health information privacy regulations (HIPAA), or ethics. And of course we already knew the answer, none.

The other question is “Who will be paying the Navigators”? You have two choices. Either the Navigators eventually become employees of an endlessly growing government program, or they are employees of organizations who have something to gain by you and I being steered into one policy versus another. And that brings us back to Mega Rx. The major pharmacy chains are currently exploring ways to have employees become Navigators under the future exchange program. Will they be impartial? Will they be looking out for your best interest? Will the sun rise from the west tomorrow morning?

This is too easy and way too transparent a case of conflict of interest. What if a major insurer is donating money to your local trade group? The employee of that trade group would work to navigate people to that company’s policy. There is a lot of money involved. This won’t be subtle. And it won’t be easily traced.

So when you get that phone call from the drug store, or the doctor’s office, or the Chamber of Commerce, and you will one day, ask yourself why. Slow the process down and try to determine who is getting paid and for what.

In the interest of creating transparency and simplicity, we have failed at both.

DAVE

www.bcandb.com

Lynnwood auto repair shop charged with insurance fraud

A Snohomish County auto repair shop has been charged with insurance fraud after charging for repairs it didn't do and parts that it never installed.

Northwestern Collision, of Lynnwood, was charged Dec. 14 in Snohomish County Superior Court. Arraignment is set for Jan. 9.

In 2009, Farmers Insurance investigators inspected 11 vehicles that had been repaired by the shop between 2007 and 2009. Of the 11, 10 "had substantial and specific" deviations from the repair estimates that Farmers had agreed to.

Among the problems: parts missing and not replaced, repairs not performed, and repairing items that were supposed to be replaced.

On Dec. 8, 2010, officers from the state insurance commissioner's Special Investigations Unit, the State Patrol and the Snohomish County Sheriff's Office served a warrant at the company's Lynnwood office. They gathered up paper files on 10 of the 11 vehicles.

The records indicated that in some cases, new parts that were supposed to be installed were instead returned to the parts dealer.

The insurer was overcharged nearly $11,000, and had to buy one customer's car, which had been rendered unsafe to drive, for another $15,446.

Cease and desist order issued to TracGuard Services

The Washington state insurance commissioner's office has told a Florida-based vehicle service contract provider to stop selling unauthorized contracts in Washington state.

TracGuard Services LLC, Jose L. Terry and Alberto Tudela, all of North Miami, have been ordered "to immediately cease and desist from engaging in or transacting the unauthorized business of insurance" in Washington.

Neither the company nor the two men are authorized to solicit or transact insurance in the state. They have not registered as a motor vechicle service contract provider in Washington.

The three have been ordered to notify all Washington residents who have purchased a service contract from them. It also warns that, pursuant to Washington state law, unauthorized insurers "shall remain personally liable for performance of the contract."

Cease and desist order issued to Mill Creek man

A Mill Creek man and company have been ordered to stop selling unauthorized vehicle service contracts.

The order names Scott L. Stevens and RVProtection.net, Inc., both of Mill Creek, Wash. In August of 2010, they sold a consumer a vehicle service contract offered by Genuine Warranty Solutions, Inc.

The problem: Genuine Warranty Solutions, Inc. is not a registered vehicle service contract provider in Washington.

The Dec. 19 order took effect immediately. Stevens and the company have the right to appeal the order.

Public notices and hearings: Change of incorporation, proposed acquisition, etc.

Notices and upcoming hearings from our public notices web page:

Proposed acquisition: Humana is proposing to become the sole owner of Arcadian Management Services and its affiliates. We've completed our review of the application for acquisition of control. No hearing's been scheduled yet, but will be soon.

Incorporation change: The Safeco Companies have requested approval to have New Hampshire be their state of incorporation. The companies, which were acquired by Boston-based Liberty Mutual in 2008, say the change would not affect any Washington policyholders, and that there would be no interruption in coverage. A hearing is scheduled for Jan. 10, 2012 at 10 a.m. in our Tumwater office, which is at 5000 Capitol Blvd. Annual reports and other documents re: the request are posted here.

Change in port of entry/redomestication: Industrial Alliance Pacific Insurance and Financial Services have filed documents to change their port of entry/redomestication to Texas. A hearing is scheduled for Feb. 1, 2012 at 1 p.m. at our Tumwater office, which is at 5000 Capitol Blvd. Documents re: the request are posted here.

googleVis 0.2.13: new stepped area chart and improved geo charts

On 7th December Google published a new version of their Visualisation API. The new version adds a new chart type: Stepped Area Chart and provides improvements to Geo Chart. Now Geo Chart has similar functionality to Geo Map, but while Geo Map requires Flash, Geo Chart doesn't, as it renders SVG/VML graphics. So it also works on your iOS devices.

These new features have been added to the googleVis R package in version 0.2.13, which went live on CRAN a few days ago.

The function gvisSteppedAreaChart works very much in the same way as gvisAreaChart. Here is a little example:

library(googleVis)
df <- data.frame(country=c("US", "GB", "BR"),
val1=c(1,3,4), val2=c(23,12,32))
SteppedArea <- gvisSteppedAreaChart(df, xvar="country",
yvar=c("val1", "val2"),
options=list(isStacked=TRUE,
width=400, height=150))
plot(SteppedArea2)

The interface to gvisGeoChart changed slightly to take into account the new version of Geo Chart by Google. The argument numvar has been renamed to colorvar and a new argument sizevar has been added. This allows you to set the size and colour of the bubbles in displayMode='markers' depending on columns in your data frame. Further, you can set far more options than you could before, in particular you can set not only the region, but also the resolution of your map. Although more granular maps are not available for all countries, for more details see the Google documentation.

Here are two examples, plotting the test data CityPopularity with a Geo Chart. The first plot shows the popularity of New York, Boston, Miami, Chicago, Los Angeles and Houston on the US map, with the resolution set to 'metros' and region set to 'US'. The Google Map API makes the correct assumption about which cities we mean.

library(googleVis> ## requires googleVis version >= 0.2.13
gcus <- gvisGeoChart(CityPopularity,
locationvar="City", colorvar="Popularity",
options=list(displayMode="markers",
region="US", resolution="metros"),
chartid="GeoChart_US")
plot(gcus)

In the second example we set the region to 'US-TX', therefore Google will look for cities with the same names in Texas. And what a surprise, there are cities/towns named Chicago, Los Angeles, Miami, Boston and of course Houston in Texas.

gctx <- gvisGeoChart(CityPopularity, 
locationvar="City", colorvar="Popularity",
options=list(displayMode="markers",
region="US-TX", resolution="metros"),
chartid="GeoChart_TX")
plot(gctx)

With the new version of the Visualisation API Google introduced also the concept of DataTable Roles. This is an interesting idea, as it allows you to add context to the data, similar to the approach used with annotated time lines. Google classifies the DataTable Roles still experimental, but it is a space to watch and ideas on how this could be translated into R will be much appreciated.

And now the news of the googleVis package since version 0.2.10:

Version 0.2.13 [2011-12-19]
==========================

Changes

o The list of arguments for gvisGeoChart changed:
- the argument 'numvar' has been renamed to 'colorvar' to
reflect the updated Google API. Additionally gvisGeoChart
gained a new argument 'sizevar'.
o Updated googleVis vignette with a section on using googleVis
output in presentations
o Renamed demo EventListner to EventListener

NEW FEATURES

o Google published a new version of their Visualisation API on 7
December 2011. Some of the new features have been implemented
into googleVis already:
- New stepped area chart function gvisSteppedAreaChart
- gvisGeoChart has a new marker mode, similar to the mode in
gvisGeoMap. See example(gvisGeoChart) for the new
functionalities.

Version 0.2.12 [2011-12-07]
==========================

Bug Fixes

o gvisMotionChart didn't display data with special characters,
e.g. spaces, &, %, in column names correctly.
Thanks to Alexander Holcroft for reporting this issue.

Version 0.2.11 [2011-11-16]
==========================

Changes

o Updated vignette and documentation with instructions on changing
the Flash security settings to display Flash charts locally.
Thanks to Tony Breyal.
o New example to plot weekly data with gvisMotionChart
o Removed local copies of gadget files to reduce package file
size. A local copy of the R script to generate the original gadget
files is still included in inst/gadgets

Version 0.2.10 [2011-09-24]
==========================

Changes

o Updated section 'Using googleVis output with Google Sites,
Blogger, etc.' vignette

o Updated example for gvisMotionChart, showing how the initial
chart setting can be changed, e.g to display a line chart.

o New example for gvisAnnotatedTimeLine, showing how to shade
areas. Thanks to Mike Silberbauer for providing the initial code.

NEW FEATURES

o New demo WorldBank. It demonstrates how country level data can
be accessed from the World Bank via their API and displayed with a
Motion Chart. Inspired by Google's Public Data Explorer, see
http://www.google.com/publicdata/home

Judge issues insurance fraud ruling...in the form of a poem

And now for something completely different:

A Pennsylvania judge has issued a ruling in an insurance fraud case. What's unusual is that the judge issued his ruling in the form of a poem. From the Associated Press:
Justice J. Michael Eakin, writing for a 4-2 majority, concluded in six-line stanzas that a man's attempt to deposit a forged check appearing to be from State Farm didn't constitute insurance fraud.
"Sentenced on the other crimes, he surely won't go free, but we find he can't be guilty of this final felony," Eakin wrote. "Convictions for the forgery and theft are approbated — the sentence for insurance fraud, however, is vacated. The case must be remanded for resentencing, we find, so the trial judge may impose the result he originally had in mind."
A 3-page dissent by another judge, AP writer Marc Levy noted, did not rhyme.

GEICO fined $100,000 for overcharging customers in WA; company will also refund $7.5 million

A Maryland-based insurance company has been fined $100,000 after overcharging thousands of its Washington state customers.
The insurer, GEICO, is also refunding $7.5 million – plus 8 percent interest -- to the 25,267 affected auto insurance consumers by the end of the year.

“A computer database error caused the problem, which the company reported to us promptly,” said Washington State Insurance Commissioner Mike Kreidler. “GEICO has also agreed to a two-year compliance plan that includes multiple audits.”

An additional $50,000 fine was suspended, on the condition that the company abides by the terms of the compliance plan.

The refunds, many of which have already been paid, will average roughly $300. The company has been contacting active and former customers affected by the issue and expects to have all refunds paid by the end of the year.

On May 26, 2011, GEICO representatives self-reported the computer error, which resulted in 7 percent of the company’s Washington customers being overcharged for insurance between Aug. 24, 2009 and June 2011.

Fines collected by the insurance commissioner’s office do not go to the agency. The money is deposited in the state’s general fund to pay for other state services.

The complete order is posted at: http://www.insurance.wa.gov/oicfiles/orders/2011orders/11-0273.pdf.

Social media, liability and insurance

Social media and insurance? Hard to imagine those words together, but the new report by the Insurance Information Institute is pretty interesting reading.

Most of us rely on social media more and more these days - whether for work or to keep with friends and family. But we probably never think about the insurance impact (ie. liability issues).

Find out if you or your business could be at risk - here's the report.

The Day After The House Burned Down

This is a post about someone with cancer. I have not met Ms. Ward, nor do I think that I ever will, but I wish her a successful recovery. This post may take issue with some of her choices and many of her conclusions. These differences should not be interpreted as personal. They are not. Too many of our discussions have devolved into the personal as they abandon fact and reason. This blog champions a polite discussion of the facts.

Spike Dolomite Ward has cancer. Ms. Ward is a forty-nine year old married mother of two. She lives in California. This past Sunday’s Plain Dealer included an article she wrote that initially appeared in the Los Angeles Times. Ms. Ward explained why she hasn’t had health insurance for over two years. Trust her, it is not her fault.

The key element, the point that requires ten paragraphs to justify, is that she has been saved by President Obama and the Patient Protection and Affordable Care Act (PPACA). How you ask? Will the President be administering the Chemo? No, but close. As we have discussed before, the PPACA included the creation of guaranteed issue policies that cover pre-existing conditions for people who have been uninsured for over six months.

  • Significant medical condition like cancer? Check.

  • About to have lots of expensive treatments? Check.

  • Uninsured for over six months? Check.

  • Insurance now seems like a really, really good idea? CHECK.


I completely understand the need to purchase homeowners insurance now that my house has burned to the ground.

Please read Ms. Ward’s article. It is entirely possible that the laws in California are very different from those here in Ohio. It is also possible that there is a touch of exaggeration and hyperbole in those first ten paragraphs. Don’t get lost in the details. They aren’t relevant. This post is about the uninsured and the individual mandate.

We are, or at least should be, responsible for our choices. Ms. Ward is not alone. There are millions of uninsured Americans. The poor have Medicaid, a program that should have received a lot more attention in the last two years. It is the working poor that are falling through our system’s cracks. There is also a large segment of the population who simply choose to spend the money on other stuff. I refuse to speculate as to Ms. Ward and her family’s status.

Ms. Ward is correct. Her life choices, her insurance choices, her and her husband’s job choices could have had devastating consequences. Instead, someone else, you, will pay the bills. Any solution that includes guaranteed issue and the complete coverage of preexisting conditions must include a mandate that requires everyone to have insurance.

The individual mandate has been both championed and disparaged by everyone from Newt Gingrich to Barack Obama. One day they embrace it. The next day they flee from the concept. As an agent, as someone in the system for thirty-three years, I am convinced that requiring people to participate is the only way a guaranteed issue plan would work. This is not limited to private insurance programs. A government plan is just as dependent on universal participation. That is why Medicare Part B and Part D penalize late enrollees.

All of the candidates expressed their hatred of the individual mandate at last week’s Republican debate. I understand. They are running for president. But the time has come to stop telling us that you hate “Obamacare” and to instead offer a realistic alternative. Better yet, there are lots of serious people waiting to hear any viable option that doesn’t include an individual mandate.

Whether or not an alternative is ever proposed and passed, we wish a full and speedy recovery to Ms. Ward. And we wonder how in the world we can afford all of the other Spike Dolomite Wards we are going to be supporting.

Data is the new gold

We need more data journalism. How else will we find the nuggets of data and information worth reading?

Life should become easier for data journalists, as the Guardian, one of the data journalism pioneers, points out in this article about the new open data initiative of the European Union (EU). The aims of the EU's open data strategy are bold. Data is seen as the new gold of the digital age. The EU is estimating that public data is already generating economic value of €32bn each year, with growth potential to €70bn, if more data will be made available. Here is the link to the press statement, which I highly recommend reading:

EUROPA - Press Releases - Neelie Kroes Vice-President of the European Commission responsible for the Digital Agenda, Data is the new gold, Opening Remarks, Press Conference on Open Data Strategy Brussels, 12th December 2011



I am particularly impressed that the EU even aims to harmonise the way data will be published by the various bodies. We know that working with data, open or proprietary, often means spending a lot of time on cleaning, reshaping and transforming it, in order to join it with other sources and to make sense out of it.

Data standards would really help in this respect. And the EU is pushing this as well. I can observe this in the insurance industry already, where new European regulatory requirements (Solvency II) force companies to increase their data management capabilities. This is often a huge investment and has to be seen as a long term project.

Although the press statement doesn't mention anything about open source software projects, I think that they are essential for unfolding the full potential of open data.

Open source projects like R provide a platform to share new ideas. I'd say that R, but equally other languages as well, provide interfaces between minds and hands. Packages, libraries, etc. make it possible to spread ideas and knowledge. Having access to scientific papers is great but being able to test the ideas in practice accelerates the time it takes to embed new developments from academia into the business world.

Number of uninsured in WA hits 1 million

We posted a report this morning detailing our estimates of the number of Washingtonians with no health insurance, the amount of uncompensated care, and how those numbers are trending.

The upshot: We calculate that:
  • The number of uninsured has reached 1 million, or 14.5 percent of the state's population.
  • Uncompensated care (bad debt and charity care at hospitals, clinics, etc.) is nearly $1 billion.
  • And that both numbers are likely to continue to rise until 2014, when the major provisions of federal health care reform are slated to take effect.
  • The percentage of residents without health coverage worsened in 31 of 39 counties.
  • In several counties, more than 1 in 5 residents has no health coverage.
“This is a grim milestone for the state, and we believe the situation will remain bleak for two more years,” said Kreidler. “But it’s important for people to know that there is hope is on the horizon.”

Counties with a particularly high percentage of uninsured residents include: Adams, Grant, Okanogan, Franklin and Yakima. But the problem also worsened in King, Pierce, Snohomish and Spokane counties.

The good news: Assuming that federal health care reform takes effect as planned, more than 800,000 uninsured Washingtonians will be eligible in 2014 for expanded Medicaid eligibility or subsidies to help low- and middle-income families pay for health coverage.

This is the third report on the uninsured our office has put out since 2006.

LondonR, 6 December 2011

The London R user group met again last Wednesday at the Shooting Star pub. And it was busy. More than 80 people had turned up. Was it the free beer and food, sponsored by Mango, which attracted the folks or the speakers? Or the venue? James Long, who organises the Chicago R user group meetings and who gave gave the first talk that night, noted that to his knowledge only the London and Chicago R users would meet in a pub.


However, it were the speakers and their talks which attracted me:
You will notice that this London R meeting had a theme around risk pricing. James talked about reinsurance pricing using R in the cloud, while Chibisi focused more on personal lines insurance with generalised linear models and Richard came from the angle of investment management and portfolio optimisation.

A $200,000 patio cover? Spokane man charged with insurance fraud

A Spokane man has been charged with insurance fraud and attempted theft after a snow-damaged patio cover worth about $4,000 mushroomed into a nearly $200,000 claim.

Keith R. Scribner, 47, was arraigned Monday in Spokane County Superior Court on one count of insurance fraud and one count of attempted theft.

In late July 2009, Scribner's mother, Marilyn Warsinske, filed a claim with Liberty Mutual insurance. She said a patio roof at a home she'd purchased had collapsed due to the weight of snow some 6 months earlier. The policy covered "like kind and quality" replacement. Her son, she told the company, would handle the claim.

Scribner told the insurance company that patio cover was an extensive structure, spanning the entire length of the patio and wrapping around the home's chimney. Claims officials, inspecting the site, wondered why was there no flashing or holes in the masonry. Scribner said that house painters must have made repairs.

He sent the insurance company three bids to replace the cover based on his description. The bids ranged from $195,586 to $213,815.

Claims officials asked Scribner for any photos of the roof prior to the damage or after it collapsed. Perhaps some were taken during a home appraisal prior to the purchase, they suggested. Scribner said there were no photos and was no appraisal.

But a claims handler discovered an aerial photo of the home on a real estate website. It showed a much smaller patio cover than Scribner claimed.

The company launched a fraud investigation and notified Insurance Commissioner Mike Kreidler's anti-fraud Special Investigations Unit.

As it turned out, there had been a home appraisal, the investigators discovered. In fact, Keith Scribner met with the appraiser. And the appraisal included photos of the patio cover. A real estate agent interviewed by investigators described the cover as being "small and nothing special or significant."

The home's previous owner also provided photographs of the structure. It was originally canvas. When that because troublesome to remove each year, the homeowner bought a polycarbonate cover. Cost: About $300.

An architect told a state fraud investigator that he'd met with Scribner in 2008 -- months before the snow collapse -- to discuss plans to replace the deck cover with new, larger one.

A local company, provided with measurements and photographs of the original structure, drew up replacement bids at the request of a state fraud investigator. The bids: $3,913 and $4,782.

Insurance problem? We can help

We're the state agency that regulates insurance in Washington state. If you're a Washingtonian, we're happy to help answer insurance questions and help try to solve problems with insurers/agents/etc.

What can you expect? If you file a complaint, for example, we will:

■ Contact the insurance company regarding your concerns, review their response, and share the results of our review with you.


■ Research and complete your complaint within 60 days.

■ Suggest steps you might take to resolve your issue.

■ Make your complaint a part of the company's public record.

■ Require the company to address your concerns and follow Washington state insurance laws and regulations.

And we get results. We get millions of dollars a year in delayed or denied claims paid to Washington consumers.

For a complete list of our customer service standards -- as well as links to easily file a complaint online -- please see our complaint help web page. You can also call our Insurance Consumer Hotline toll-free at 1-800-562-6900.

We'll try our best to help.

Discipline

We all know people who have invested in $2,500 clothing racks. OK, the store called the equipment an exercise bike or a treadmill. But sitting idly in the bedroom with clothing draped over it, the apparatus is obviously a clothing rack. What a waste of money! If only these people had the discipline to take full advantage of their investment.

Recent studies performed by researchers at Duke University have proven that the above problem may not be shared by physicians. If a doctor purchases equipment, such as expensive heart-testing or imaging equipment, they use it. In fact, it appears that these doctors may be using their equipment regardless of whether the patient needs the testing or not.

That’s what I call discipline.

USA Today reported this past week about a Duke University study of 500 MRI scans that had been performed on patients with lower back pain. The researchers were trying to determine whether doctors who own the equipment order more tests than those who don’t. You bet they did. Almost twice as many normal results (106 vs. 57) were found on scans ordered by doctors with an economic incentive than by those who didn’t.

The article notes that MRI scanning equipment carries a price tag of over $1,000,000 and that the patient or insurer is charged about $2,000 per test. Once you’ve got the equipment, you might as well use it, just to be safe.

Consumer Reports carried a similar story in early November. Duke University researchers reviewed the health insurance records of 18,000 health patients. The original study was published in the Journal of the American Medical Association.

“…the researchers found that patients of doctors who billed for both technical and professional fees – an indication that the doctors owned the medical equipment themselves – were more than twice as likely to undergo a nuclear stress test and more than seven times as likely to undergo stress echocardiography than patients of doctors who did not bill for those fees.”


A July 25th article in Washington Post notes that unnecessary tests don’t just waste money. There are also the risks of false positives that lead to further unneeded procedures including surgery.

Whether we are discussing lower back pain or heart problems, the patient is always his/her best advocate. But when you are in pain or when you have been diagnosed with a heart problem and coming to terms with your own mortality, are you going to ask the doctor if a test is really necessary? Or, are you going to do what you are told, especially if the test is being paid by your insurance?

This is part of cost containment. It doesn’t matter whether insurers or the government is paying the bill. An aging population is going to have more conditions, not less. And doctors, unchecked, are going to order more tests, not less.

There are doctors that will point to the risk of lawsuits as for their motivation to order so many tests. Yes, tort reform is also an important part of cost containment.

As of today, December 5, 2011, there has been precious little done to control costs. The authors of the Patient Protection and Affordable Care Act may not understand why the price of health care continues to rise. But then again, there are lots of suburbanites who don’t understand why they haven’t lost any weight. They bought the StairMaster. It is in their bedroom. Under the towels.

DAVE

www.bcandb.oom

Fitting distributions with R

Fitting distribution with R is something I have to do once in a while, but where do I start?

A good starting point to learn more about distribution fitting with R is Vito Ricci's tutorial on CRAN. I also find the vignettes of the actuar and fitdistrplus package a good read. I haven't looked into the recently published Handbook of fitting statistical distributions with R, by Z. Karian and E.J. Dudewicz, but it might be worthwhile in certain cases, see Xi'An's review. A more comprehensive overview of the various R packages is given by the CRAN Task View: Probability Distributions, maintained by Christophe Dutang.

How do I decide which distribution might be a good starting point?

I came across the paper Probabilistic approaches to risk by Aswath Damodaran. In Appendix 6.1 Aswath discusses the key characteristics of the most common distributions and in Figure 6A.15 he provides a decision tree diagram for choosing a distribution:


JD Long points to the Clickable diagram of distribution relationships by John Cook in his blog entry about Fitting distribution X to data from distribution Y . With those two charts I find it not too difficult anymore to find a reasonable starting point.

Once I have decided which distribution might be a good fit I start usually with the fitdistr function of the MASS package. However, since I discovered the fitdistrplus package I have become very fond of the fitdist function, as it comes with a wonderful plot method. It plots an empirical histogram with a theoretical density curve, a QQ and PP-plot and the empirical cumulative distribution with the theoretical distribution. Further, the package provides also goodness of fit tests via gofstat.

Suppose I have only 50 data points, of which I believe that they follow a log-normal distribution. How much variance can I expect? Well, let's experiment. I draw 50 random numbers from a log-normal distribution, fit the distribution to the sample data and repeat the exercise 50 times and plot the results using the plot function of the fitdistrplus package.


I notice quite a big variance in the results. For some samples other distributions, e.g. logistic, could provide a better fit. You might argue that 50 data points is not a lot of data, but in real life it often is, and hence this little example already shows me that fitting a distribution to data is not just about applying an algorithm, but requires a sound understanding of the process which generated the data as well.