Re: [R] working with summarized data

2006-09-29 Thread Anupam Tyagi
Hi Rick, I came across your posting that I had replied to. I had assumed from your posting that you had positive integer weights, and that you had a certain kind of stratified sampling. For a general case, you may want to look at survey package. Graphical representation of survey data,

Re: [R] working with summarized data

2006-09-29 Thread Anupam Tyagi
Thomas Lumley tlumley at u.washington.edu writes: 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

Re: [R] working with summarized data

2006-09-01 Thread Anupam Tyagi
One solution is to simulate the population by repeating each row weight number of times. This is inefficient. It may create a very large dataset for a large sample survey. But some of graphs and other things may turn out to your liking, depending upon how the functions are written. Anupam. Rick

[R] working with summarized data

2006-08-30 Thread Rick Bischoff
The data sets I am working with all have a weight variable--e.g., each row doesn't mean 1 observation. With that in mind, nearly all of the graphs and summary statistics are incorrect for my data, because they don't take into account the weight. For example median is incorrect, as the

Re: [R] working with summarized data

2006-08-30 Thread Gabor Grothendieck
In each case, look around (help.search, RSiteSearch) to see if you can find a function that handles weights. For the case you mention, medians, it can be done via quantile regression: x - w - 1:5 library(quantreg) coef(rq(x ~ 1, weight = w)) On 8/30/06, Rick Bischoff

Re: [R] working with summarized data

2006-08-30 Thread Rick Bischoff
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

Re: [R] working with summarized data

2006-08-30 Thread Thomas Lumley
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

Re: [R] working with summarized data

2006-08-30 Thread Greg Snow
@stat.math.ethz.ch Subject: [R] working with summarized data The data sets I am working with all have a weight variable--e.g., each row doesn't mean 1 observation. With that in mind, nearly all of the graphs and summary statistics are incorrect for my data, because they don't take into account the weight