Message-ID: <Pine.LNX.4.64.0608300958090.17647@homer23.u.washington.edu>
Date: 2006-08-30T17:00:51Z
From: Thomas Lumley
Subject: working with summarized data
In-Reply-To: <F5867361-7417-4020-B3C0-C89DE185617E@gmail.com>
On Wed, 30 Aug 2006, Rick Bischoff wrote:
>>> Unfortunately, it seems that most(all?) of R's graphics and summary
>>> statistic functions don't take a weight or frequency argument.
>>> (Fortunately the models do...)
>>
>> I have been been meaning to add this functionality to my graphics
>> package ggplot (http://had.co.nz/ggplot), but unfortunately haven't
>> had time yet. I'm guessing you want something like:
>>
>> * scatterplot: scale size of point according to weight (can do)
>> * bar chart: bars should have height proportional to weight (can do)
>> * histogram: area proportion to weighting variable (have some half
>> finished code to do)
>> * smoothers: should automatically use weights
>> * boxplot: use weighted quantiles/letter statistics (is there a
>> function for that?)
>>
>> What else is there?
>
> densityplot is the only other one I can think of at the moment...
> With the rest of those, I could certainly live without it though!
>
Density plots, scatterplot smoothers, hexbin plots, bubble plots,
histograms, and boxplots are available in the survey package. These are
probability-weighted rather than frequency-weighted but it doesn't matter
for graphics. You could use them as is (which requires setting up a
survey design object) or rip the internals out of them.
-thomas