On Tue, 17 Feb 2009, Brigid Mooney wrote:
Thanks for pointing me to the quantreg package as a resource. I was hoping
to ask be able to address one quick follow-up question...
I get slightly different variants between using the rq funciton with formula
= mydata ~ 1 as I would if I ran the same
Here is one kind of weighted quantile function.
The basic idea is very simple:
wquantile <- function( v, w, p )
{
v <- v[order(v)]
w <- w[order(v)]
v [ which.max( cumsum(w) / sum(w) >= p ) ]
}
With some more error-checking and general clean-up, it looks like this:
# Simple weigh
url:www.econ.uiuc.edu/~rogerRoger Koenker
emailrkoen...@uiuc.eduDepartment of Economics
vox: 217-333-4558University of Illinois
fax: 217-244-6678Champaign, IL 61820
On Feb 17, 2009, at 1:58 PM, Brigid Mooney wrote:
Than
Thanks for pointing me to the quantreg package as a resource. I was hoping
to ask be able to address one quick follow-up question...
I get slightly different variants between using the rq funciton with formula
= mydata ~ 1 as I would if I ran the same data using the quantile function.
Example:
I do know that Harrell's Quantile function in the Hmisc package will
allow quantile estimates from models. Whether it is general enough to
extend to time series, I have no experience and cannot say.
--
David Winsemius
On Feb 17, 2009, at 11:57 AM, Brigid Mooney wrote:
Hi All,
I am lookin
Hi All,
I am looking at applications of percentiles to time sequenced data. I had
just been using the quantile function to get percentiles over various
periods, but am more interested in if there is an accepted (and/or
R-implemented) method to apply weighting to the data so as to weigh recent
dat
6 matches
Mail list logo