Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Re: rank regression
From
R Zhang <[email protected]>
To
[email protected]
Subject
Re: st: Re: rank regression
Date
Mon, 24 Feb 2014 13:32:23 -0500
Hi John,
what do you mean by rank ordering to be roughly equidistant? please
excuse my ignorance.
Rochelle
On Mon, Feb 24, 2014 at 2:05 AM, John Antonakis <[email protected]> wrote:
> If the dependent variable is a rank, where rank ordering does not seem to be
> roughly equidistant, then they should have used an ordinal probit or logisit
> estimator: -oprobit- or -ologisit-. If the independent variables are in the
> same boat (non equidistant), I would model them as dummies.
>
> Best,
> J.
>
> __________________________________________
>
> John Antonakis
> Professor of Organizational Behavior
> Director, Ph.D. Program in Management
>
> Faculty of Business and Economics
> University of Lausanne
> Internef #618
> CH-1015 Lausanne-Dorigny
> Switzerland
> Tel ++41 (0)21 692-3438
> Fax ++41 (0)21 692-3305
> http://www.hec.unil.ch/people/jantonakis
>
> Associate Editor:
> The Leadership Quarterly
> Organizational Research Methods
> __________________________________________
>
>
> On 24.02.2014 04:25, Joseph Coveney wrote:
>>
>> Rochelle Zhang wrote:
>>
>> a finance paper I was reading today uses rank regression , the author
>> states that they replace both the dependent variable and independent
>> variables by their respective ranks and evaluation the regression
>> using the ordinary least squares.
>>
>> I searched "stata rank regression", and did not find anything. If you
>> have knowledge how to conduct such regression, please share.
>>
>>
>> --------------------------------------------------------------------------------
>>
>> From your description, it sounds like the authors of the finance paper
>> were just computing Spearman's correlation coefficient. See the Spearman
>> section of the do-file's output below.
>>
>> On the other hand, if there were two (or more) independent variables, then
>> they might have been doing what I call "Koch's nonparametric ANCOVA". See
>> the last section of the output below. You can read about it at this URL:
>> https://circ.ahajournals.org/content/114/23/2528.full and the references
>> cited there. Scroll down until you come to the section that is titled,
>> "Extensions of the Rank Sum Test".
>>
>> Joseph Coveney
>>
>> . clear *
>>
>> . set more off
>>
>> . set seed `=date("2014-02-24", "YMD")'
>>
>> . quietly set obs 10
>>
>> . generate byte group = mod(_n, 2)
>>
>> . generate double a = rnormal()
>>
>> . generate double b = rnormal()
>>
>> .
>> . *
>> . * Spearman's rho
>> . *
>> . egen double ar = rank(a)
>>
>> . egen double br = rank(b)
>>
>> . regress ar c.br
>>
>> Source | SS df MS Number of obs =
>> 10
>> -------------+------------------------------ F( 1, 8) =
>> 0.64
>> Model | 6.13636364 1 6.13636364 Prob > F =
>> 0.4458
>> Residual | 76.3636364 8 9.54545455 R-squared =
>> 0.0744
>> -------------+------------------------------ Adj R-squared =
>> -0.0413
>> Total | 82.5 9 9.16666667 Root MSE =
>> 3.0896
>>
>>
>> ------------------------------------------------------------------------------
>> ar | Coef. Std. Err. t P>|t| [95% Conf.
>> Interval]
>>
>> -------------+----------------------------------------------------------------
>> br | .2727273 .3401507 0.80 0.446 -.5116616
>> 1.057116
>> _cons | 4 2.110579 1.90 0.095 -.8670049
>> 8.867005
>>
>> ------------------------------------------------------------------------------
>>
>> . test br
>>
>> ( 1) br = 0
>>
>> F( 1, 8) = 0.64
>> Prob > F = 0.4458
>>
>> . // or
>> . spearman a b
>>
>> Number of obs = 10
>> Spearman's rho = 0.2727
>>
>> Test of Ho: a and b are independent
>> Prob > |t| = 0.4458
>>
>> .
>> . *
>> . * Koch's nonparametric ANCOVA
>> . *
>> . predict double residuals, residuals
>>
>> . ttest residuals, by(group)
>>
>> Two-sample t test with equal variances
>>
>> ------------------------------------------------------------------------------
>> Group | Obs Mean Std. Err. Std. Dev. [95% Conf.
>> Interval]
>>
>> ---------+--------------------------------------------------------------------
>> 0 | 5 1.018182 1.601497 3.581057 -3.428287
>> 5.464651
>> 1 | 5 -1.018182 .8573455 1.917083 -3.398555
>> 1.362191
>>
>> ---------+--------------------------------------------------------------------
>> combined | 10 0 .9211324 2.912876 -2.083746
>> 2.083746
>>
>> ---------+--------------------------------------------------------------------
>> diff | 2.036364 1.816545 -2.152596
>> 6.225323
>>
>> ------------------------------------------------------------------------------
>> diff = mean(0) - mean(1) t =
>> 1.1210
>> Ho: diff = 0 degrees of freedom =
>> 8
>>
>> Ha: diff < 0 Ha: diff != 0 Ha: diff >
>> 0
>> Pr(T < t) = 0.8526 Pr(|T| > |t|) = 0.2948 Pr(T > t) =
>> 0.1474
>>
>> . // or
>> . pwcorr residuals group, sig
>>
>> | residu~s group
>> -------------+------------------
>> residuals | 1.0000
>> |
>> |
>> group | -0.3685 1.0000
>> | 0.2948
>> |
>>
>> .
>> . exit
>>
>> end of do-file
>>
>>
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/