[R] Would like to apply a weight variable to the summary function in Hmisc
Frank E Harrell Jr
fharrell at virginia.edu
Mon Aug 18 13:20:38 CEST 2003
On Sun, 17 Aug 2003 21:31:38 -0500
"Greg Blevins" <gblevins at mn.rr.com> wrote:
> In the Hmisc package, functions describe and summarize can explicitly take a
> weight variable.
> My question is can a weight variable be applied when using 'summary'?
> For example, using...summary(var1 ~ var2) I would like to weight the data
> by var 3 (same length).
> Is this possible?
No but you can do this with summarize (if all you want is cross-classification) using an example I posted on r-help a few weeks ago.
> Thanks a lot.
> Greg Blevins
> The Market Solutions Group, Inc.
> R-help at stat.math.ethz.ch mailing list
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
More information about the R-help