While perhaps not the solution you were looking for, you might consider 
estimating weighted medians with linear quantile regression (just specify 
an intercept for single sample analysis, tau=0.50, and weights = your 
weights) in the quantreg package. Quantile regression does not require 
sorting to estimate medians (minimizes and objective function)  and thus 
might require less computing time on a large data set. 

Brian

Brian S. Cade, PhD

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

email:  brian_c...@usgs.gov
tel:  970 226-9326



From:
Joris Meys <jorism...@gmail.com>
To:
R mailing list <r-help@r-project.org>
Date:
03/30/2010 10:39 AM
Subject:
[R] weighted.median function from package R.basic
Sent by:
r-help-boun...@r-project.org



Dear all,

I want to apply a weighted median on a huge dataset, and I remember a
function from the package R.basic that could do this using an internal
sorting algorithm qsort. This speeded things up quite a bit. Alas, I can't
find that package anywhere anymore. There is a weighted.median function in
the package limma too, but I didn't use that before.

Anybody who knows what happened to  R.basic?

Cheers
Joris

-- 
Joris Meys
Statistical Consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

Coupure Links 653
B-9000 Gent

tel : +32 9 264 59 87
joris.m...@ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

                 [[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.

Reply via email to