regressing ranks against continuous variables ?

Sell the highs, buy the lows, take their money, bash their nose.
Post Reply
lexx
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by lexx »

Dear colleagues:



Quick question - in my regression y = b*X, y is a ranked data, that is all values are in the range 1 to 100 and each value has an equal proportion. Same as when the sample is broken into top 25%, next 25% and so on only i assign values of 1 to bottom 1%, 2 - next bottom 1% of sorted values etc. While X variables are continuous, can take any values positive or negative.



I use OLS but wonder if there is a different regression type that is more suitable to this problem ?

Reason is that in OLS one minimizes sum (y -b*X)^2 over b, while I should actually minimize sum (y - Rank(b*X))^2, where Rank converts any vector into 1-100 values (i don't have any ties, so no extreme cases like 10% of values are distinct and the rest of 90% are the same, no - all values in the vector that goes into ranking are distinct). Or there is no advantage over OLS ?



Also if other method is more suitable, is there an R package available ?



Many thanks.
Commodore
Posts: 1
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by Commodore »

What you want is called, "Learning to Rank." It has been heavily studied over the past 10 years for information retrieval (search engines). This book is a good survey:

Learning to Rank for Information Retrieval



I don't know R, but there some publicly available implementations of some algorithms. RankLib is a good starting point:
Quant News
User avatar
Hansi
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by Hansi »

Haven't dealt with the exact problem but we did wind up using this package to deal with a not too dissimilar problem:

http://cran.r-project.org/web/packages/robustbase/index.html
User avatar
goldorak
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by goldorak »

lexx, you might want to check your email in connection to commodore's answer.
If you are not living on the edge you are taking up too much space.
User avatar
polysena
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by polysena »

Dear Lexx,

I am not sure why your post is in Trading and what is it you are trying to achieve with your regression, so apologies if my answer is not to the point. As you suspect the assumptions underlying the multivariate/univariate (I do not know whether your "x" is a vector or not) linear model ( OLS) require "interval level measurement" of the dependent variable "y". In your description this seems not be the case; but then I might be failing to understand what you mean by "each value has equal proportion" please check here.



So in general, and in statistics, if the fact that "y" is ranked is of importance to you then the kind of approach you might want to investigate is the general regression class of models called "logistic ordinal regression" or "generalized linear model for ordinal data". Within this class of approaches you have a few types of approaches. These approaches have often packages in r, or sas, or spss, depending on what software access you have.



you might try to look at this first to figure out whether this is what you are looking for or this.



Regards Polysena
И ветер, и дождик, и мгла Над холодной пустыней воды.
User avatar
deeds
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by deeds »

Perhaps a variant of ordinal logistic regression



Multi-variate ordinal logistic regression is commonly used to regress corporate credit rating on fundamental financial metrics



Might be able to find a paper on it, if you are interested



LMK
perpetulant
User avatar
Polter
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

regressing ranks against continuous variables ?

Post by Polter »

Two standard models would be the ordered probit model and the multinomial logit model.



The choice depends on whether you care about the order:



"The key feature of ordered qualitative response models like the ordered probit model is that all the choices depend on a single index function. This makes sense only when the responses have a natural ordering. A different sort of model is evidently necessary to deal with unordered responses. The most popular of these is the multinomial logit model, sometimes called the multiple logit model, which has been widely used in applied work."



// From: "Econometric Theory and Methods" by Davidson & MacKinnon, which happens to be a pretty good intro.



If your data is truly "ranks", then I believe you have ordered responses, so an ordered model would account for that.



The model deeds mentioned is an example of that -- here's a worked R example: http://statistics.ats.ucla.edu/stat/r/dae/ologit.htm



For more choices / overviews see:

- http://www.nber.org/chapters/c10405.pdf

- http://en.wikipedia.org/wiki/Discrete_choice // the models listed under Model Applications / Ranking of Alternatives may be worth considering
MadMax, some curiosities regarding the performance of std::accumulate are also related to it using operator+ (not operator+=) and issues with trying to optimize it with move semantics (from a compiler point of view) keeping standard-compliance; discussion here: http://gcc.gnu.org/ml/libstdc++/2011-01/msg00015.html

I solely mention those as "curiosities", since I wouldn't expect them to have an impact on "small" data structures (like a built-in double) (and the example above considers std::string), but it might still be of interest.
Post Reply