Greg Blevins
2003-Aug-18 02:31 UTC
[R] Would like to apply a weight variable to the summary function in Hmisc
Hello, 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? Thanks a lot. Greg Blevins The Market Solutions Group, Inc.
Frank E Harrell Jr
2003-Aug-18 11:20 UTC
[R] Would like to apply a weight variable to the summary function in Hmisc
On Sun, 17 Aug 2003 21:31:38 -0500 "Greg Blevins" <gblevins at mn.rr.com> wrote:> Hello, > > 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. Frank> > Thanks a lot. > Greg Blevins > The Market Solutions Group, Inc. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help--- 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
Maybe Matching Threads
- How to display each symbol in a different color using plot with summary.formula.reverse
- Request help writing a function
- Attempting to recode elements contained in a list
- Release of Design library; update of Hmisc library
- Release of Design library; update of Hmisc library