Re: [R] weighted quantiles

2008-10-22 Thread Norbert NEUWIRTH
Dear Frank,

Thank you for your usefull package Hmisc! I use it in my microsimulation 
project every day. But now a problem arose ...

Having updated to R 2.8.0 (under windows XP) your library Hmisc isn't 
installed any more. Trying to reinstal I recognized, that it isn't even in the 
package list. When trying to reinstal it via local zip-sources I get the 
error-message (wrong R version ... ).

Will the Hmisc-package be updated or are their functions now embedded within 
another package??

Thanks,

  Norbert




Am 07.10.2008, 21:13 Uhr, schrieb Frank E Harrell Jr [EMAIL PROTECTED]:

 sj wrote:
 I have a set of values and their corresponding weights. I can use the
 function weighted.mean to calculate the weighted mean, I would like to be
 able to similarly calculate the weighted median and quantiles? Is there a
 function in R that can do this?

 thanks,


 Spencer

 library(Hmisc)
 ?wtd.quantile



 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 



-- 
**
Mag. Norbert Neuwirth

Österreichisches Institut für Familienforschung (ÖIF) - Universität Wien
Austrian Institute for Family Studies - University of Vienna

http://www.oif.ac.at

e-mail:[EMAIL PROTECTED]
tel:  +43-1-4277-489-11
fax: +43-1-4277-9-489
address:  A-1010 Wien, Grillparzerstraße 7/9

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] weighted quantiles

2008-10-07 Thread sj
I have a set of values and their corresponding weights. I can use the
function weighted.mean to calculate the weighted mean, I would like to be
able to similarly calculate the weighted median and quantiles? Is there a
function in R that can do this?

thanks,


Spencer

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] weighted quantiles

2008-10-07 Thread Frank E Harrell Jr

sj wrote:

I have a set of values and their corresponding weights. I can use the
function weighted.mean to calculate the weighted mean, I would like to be
able to similarly calculate the weighted median and quantiles? Is there a
function in R that can do this?

thanks,


Spencer


library(Hmisc)
?wtd.quantile





__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] weighted quantiles

2008-10-07 Thread Brian S Cade
Try the linear quantile regression function rq() in the quantreg package. 
For 1 sample estimates, your model would have just an intercept term. 
There is a weight argument.

quantiles.out - rq(y ~ 1, data=mydata, tau=1:9/10, weight=myweights)

would yield the 0.10, 0.20, ..., 0.80, 0.90 weighted quantile estimates.

Brian

Brian S. Cade, PhD

U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO  80526-8818

email:  [EMAIL PROTECTED]
tel:  970 226-9326



sj [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
10/07/2008 12:38 PM

To
r-help [EMAIL PROTECTED]
cc

Subject
[R] weighted quantiles






I have a set of values and their corresponding weights. I can use the
function weighted.mean to calculate the weighted mean, I would like to be
able to similarly calculate the weighted median and quantiles? Is there a
function in R that can do this?

thanks,


Spencer

 [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.