Quantile Regression without intercept

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Quantile Regression without intercept

Preetam Pal
Hi guys,

Can you instruct me please how to run quantile regression without the intercept term? I only know about the rq function under quantreg package, but it automatically uses an intercept model. Icant change that, it seems.

I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and Unemployment). Their sizes are 125 each.

Appreciate your help with this.

Regards,
Preetam
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Roger Koenker-3
as for lm()  or any other linear model fitting….

        rq( y ~ x - 1, … )


url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    [hidden email]            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Urbana, IL 61801

> On Oct 5, 2015, at 10:27 AM, Preetam Pal <[hidden email]> wrote:
>
> Hi guys,
>
> Can you instruct me please how to run quantile regression without the intercept term? I only know about the rq function under quantreg package, but it automatically uses an intercept model. Icant change that, it seems.
>
> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and Unemployment). Their sizes are 125 each.
>
> Appreciate your help with this.
>
> Regards,
> Preetam
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

ssefick
In reply to this post by Preetam Pal
I have never used this, but does the formula interface work like lm? Y~X-1?

On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]> wrote:

> Hi guys,
>
> Can you instruct me please how to run quantile regression without the
> intercept term? I only know about the rq function under quantreg package,
> but it automatically uses an intercept model. Icant change that, it seems.
>
> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> Unemployment). Their sizes are 125 each.
>
> Appreciate your help with this.
>
> Regards,
> Preetam
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



--
Stephen Sefick
**************************************************
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**************************************************
[hidden email]
http://www.auburn.edu/~sas0025
**************************************************

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

                              -Robert Gentleman

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Preetam Pal
Yes..it works. .... Thanks 😃

-----Original Message-----
From: "stephen sefick" <[hidden email]>
Sent: ‎05-‎10-‎2015 09:01 PM
To: "Preetam Pal" <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [R] Quantile Regression without intercept

I have never used this, but does the formula interface work like lm? Y~X-1?


On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]> wrote:

Hi guys,

Can you instruct me please how to run quantile regression without the intercept term? I only know about the rq function under quantreg package, but it automatically uses an intercept model. Icant change that, it seems.

I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and Unemployment). Their sizes are 125 each.

Appreciate your help with this.

Regards,
Preetam
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.






--

Stephen Sefick
**************************************************
Auburn University                                        
Biological Sciences                                      
331 Funchess Hall                                      
Auburn, Alabama                                        
36849                                                          
**************************************************
[hidden email]                                  
http://www.auburn.edu/~sas0025                 
**************************************************

Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods.  We are mammals, and have not exhausted the annoying little problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                              -Robert Gentleman
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Lorenz, David
In reply to this post by Preetam Pal
Did you verify that the correct percentages were above/below the regression
lines? I did a quick check and for example did not consistently get 50% of
the observed response values greater than the tau=.5 line. I did when I
included the nonzero intercept term.



> Date: Mon, 5 Oct 2015 21:14:04 +0530
> From: Preetam Pal <[hidden email]>
> To: stephen sefick <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
> Subject: Re: [R] Quantile Regression without intercept
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
>
> Yes..it works. .... Thanks ??
>
> -----Original Message-----
> From: "stephen sefick" <[hidden email]>
> Sent: ?05-?10-?2015 09:01 PM
> To: "Preetam Pal" <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
> Subject: Re: [R] Quantile Regression without intercept
>
> I have never used this, but does the formula interface work like lm? Y~X-1?
>
>
> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
> wrote:
>
> Hi guys,
>
> Can you instruct me please how to run quantile regression without the
> intercept term? I only know about the rq function under quantreg package,
> but it automatically uses an intercept model. Icant change that, it seems.
>
> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> Unemployment). Their sizes are 125 each.
>
> Appreciate your help with this.
>
> Regards,
> Preetam
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
>
>
>
>
>
> --
>
> Stephen Sefick
> **************************************************
> Auburn University
> Biological Sciences
> 331 Funchess Hall
> Auburn, Alabama
> 36849
> **************************************************
> [hidden email]
> http://www.auburn.edu/~sas0025
> **************************************************
>
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
>                                 -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>                               -Robert Gentleman
>         [[alternative HTML version deleted]]
>
>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Roger Koenker-3
In reply to this post by Preetam Pal

> On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
>
> Did you verify that the correct percentages were above/below the regression
> lines? I did a quick check and for example did not consistently get 50% of
> the observed response values greater than the tau=.5 line. I did when I
> included the nonzero intercept term.

Your "correct percentages" are only correct when you have an intercept in the model,
without an intercept there is no gradient condition to ensure that.

>
>
>
>> Date: Mon, 5 Oct 2015 21:14:04 +0530
>> From: Preetam Pal <[hidden email]>
>> To: stephen sefick <[hidden email]>
>> Cc: "[hidden email]" <[hidden email]>
>> Subject: Re: [R] Quantile Regression without intercept
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> Yes..it works. .... Thanks ??
>>
>> -----Original Message-----
>> From: "stephen sefick" <[hidden email]>
>> Sent: ?05-?10-?2015 09:01 PM
>> To: "Preetam Pal" <[hidden email]>
>> Cc: "[hidden email]" <[hidden email]>
>> Subject: Re: [R] Quantile Regression without intercept
>>
>> I have never used this, but does the formula interface work like lm? Y~X-1?
>>
>>
>> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
>> wrote:
>>
>> Hi guys,
>>
>> Can you instruct me please how to run quantile regression without the
>> intercept term? I only know about the rq function under quantreg package,
>> but it automatically uses an intercept model. Icant change that, it seems.
>>
>> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
>> Unemployment). Their sizes are 125 each.
>>
>> Appreciate your help with this.
>>
>> Regards,
>> Preetam
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>>
>>
>>
>>
>>
>> --
>>
>> Stephen Sefick
>> **************************************************
>> Auburn University
>> Biological Sciences
>> 331 Funchess Hall
>> Auburn, Alabama
>> 36849
>> **************************************************
>> [hidden email]
>> http://www.auburn.edu/~sas0025
>> **************************************************
>>
>> Let's not spend our time and resources thinking about things that are so
>> little or so large that all they really do for us is puff us up and make us
>> feel like gods.  We are mammals, and have not exhausted the annoying little
>> problems of being mammals.
>>
>>                                -K. Mullis
>>
>> "A big computer, a complex algorithm and a long time does not equal
>> science."
>>
>>                              -Robert Gentleman
>>        [[alternative HTML version deleted]]
>>
>>
>>
>>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Lorenz, David
Thanks for the details, I suspected something like that.
I think that begs the question: what is the meaning of quantile regression
through the origin? If the tau=.5 line does not pass through 1/2 the data
how do I interpret the line?


On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker <[hidden email]> wrote:

>
> > On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
> >
> > Did you verify that the correct percentages were above/below the
> regression
> > lines? I did a quick check and for example did not consistently get 50%
> of
> > the observed response values greater than the tau=.5 line. I did when I
> > included the nonzero intercept term.
>
> Your "correct percentages" are only correct when you have an intercept in
> the model,
> without an intercept there is no gradient condition to ensure that.
> >
> >
> >
> >> Date: Mon, 5 Oct 2015 21:14:04 +0530
> >> From: Preetam Pal <[hidden email]>
> >> To: stephen sefick <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >> Message-ID: <[hidden email]>
> >> Content-Type: text/plain; charset="UTF-8"
> >>
> >> Yes..it works. .... Thanks ??
> >>
> >> -----Original Message-----
> >> From: "stephen sefick" <[hidden email]>
> >> Sent: ?05-?10-?2015 09:01 PM
> >> To: "Preetam Pal" <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >>
> >> I have never used this, but does the formula interface work like lm?
> Y~X-1?
> >>
> >>
> >> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
> >> wrote:
> >>
> >> Hi guys,
> >>
> >> Can you instruct me please how to run quantile regression without the
> >> intercept term? I only know about the rq function under quantreg
> package,
> >> but it automatically uses an intercept model. Icant change that, it
> seems.
> >>
> >> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> >> Unemployment). Their sizes are 125 each.
> >>
> >> Appreciate your help with this.
> >>
> >> Regards,
> >> Preetam
> >>        [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Stephen Sefick
> >> **************************************************
> >> Auburn University
> >> Biological Sciences
> >> 331 Funchess Hall
> >> Auburn, Alabama
> >> 36849
> >> **************************************************
> >> [hidden email]
> >> http://www.auburn.edu/~sas0025
> >> **************************************************
> >>
> >> Let's not spend our time and resources thinking about things that are so
> >> little or so large that all they really do for us is puff us up and
> make us
> >> feel like gods.  We are mammals, and have not exhausted the annoying
> little
> >> problems of being mammals.
> >>
> >>                                -K. Mullis
> >>
> >> "A big computer, a complex algorithm and a long time does not equal
> >> science."
> >>
> >>                              -Robert Gentleman
> >>        [[alternative HTML version deleted]]
> >>
> >>
> >>
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Roger Koenker-3
In reply to this post by Roger Koenker-3

> On Oct 6, 2015, at 8:32 AM, Lorenz, David <[hidden email]> wrote:
>
> Thanks for the details, I suspected something like that.
> I think that begs the question: what is the meaning of quantile regression through the origin? If the tau=.5 line does not pass through 1/2 the data how do I interpret the line?

As an estimate of the conditional median (quantile) function when constrained to pass through
the origin… as with least squares fitting without an intercept, you do this at your peril.

>
>
> On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker <[hidden email]> wrote:
>
> > On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
> >
> > Did you verify that the correct percentages were above/below the regression
> > lines? I did a quick check and for example did not consistently get 50% of
> > the observed response values greater than the tau=.5 line. I did when I
> > included the nonzero intercept term.
>
> Your "correct percentages" are only correct when you have an intercept in the model,
> without an intercept there is no gradient condition to ensure that.
> >
> >
> >
> >> Date: Mon, 5 Oct 2015 21:14:04 +0530
> >> From: Preetam Pal <[hidden email]>
> >> To: stephen sefick <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >> Message-ID: <[hidden email]>
> >> Content-Type: text/plain; charset="UTF-8"
> >>
> >> Yes..it works. .... Thanks ??
> >>
> >> -----Original Message-----
> >> From: "stephen sefick" <[hidden email]>
> >> Sent: ?05-?10-?2015 09:01 PM
> >> To: "Preetam Pal" <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >>
> >> I have never used this, but does the formula interface work like lm? Y~X-1?
> >>
> >>
> >> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
> >> wrote:
> >>
> >> Hi guys,
> >>
> >> Can you instruct me please how to run quantile regression without the
> >> intercept term? I only know about the rq function under quantreg package,
> >> but it automatically uses an intercept model. Icant change that, it seems.
> >>
> >> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> >> Unemployment). Their sizes are 125 each.
> >>
> >> Appreciate your help with this.
> >>
> >> Regards,
> >> Preetam
> >>        [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Stephen Sefick
> >> **************************************************
> >> Auburn University
> >> Biological Sciences
> >> 331 Funchess Hall
> >> Auburn, Alabama
> >> 36849
> >> **************************************************
> >> [hidden email]
> >> http://www.auburn.edu/~sas0025
> >> **************************************************
> >>
> >> Let's not spend our time and resources thinking about things that are so
> >> little or so large that all they really do for us is puff us up and make us
> >> feel like gods.  We are mammals, and have not exhausted the annoying little
> >> problems of being mammals.
> >>
> >>                                -K. Mullis
> >>
> >> "A big computer, a complex algorithm and a long time does not equal
> >> science."
> >>
> >>                              -Robert Gentleman
> >>        [[alternative HTML version deleted]]
> >>
> >>
> >>
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Peter Dalgaard-2
To wit:

> y <- rnorm(100, 10)
> x <- 1:100
> sum(resid(lm(y~x)))
[1] 1.047773e-15
> sum(resid(lm(y~x-1)))
[1] 243.0583

and replicating this should convince you that the mean residual really is not zero in the severely misspecified model with no intercept. (This has to do with the fact that residuals for small x will be positive but have little leverage on the slope of the regression line.)

With a correctly specified model, the theoretical mean residual is in fact zero, but it won't be exactly zero for any individual fit. Try e.g.

> x <- 1:100
> r <- replicate(10000, {y <- rnorm(100, x); mean(resid(lm(y~x-1)))})
> hist(r)

-pd

On 06 Oct 2015, at 15:38 , Roger Koenker <[hidden email]> wrote:

>
>> On Oct 6, 2015, at 8:32 AM, Lorenz, David <[hidden email]> wrote:
>>
>> Thanks for the details, I suspected something like that.
>> I think that begs the question: what is the meaning of quantile regression through the origin? If the tau=.5 line does not pass through 1/2 the data how do I interpret the line?
>
> As an estimate of the conditional median (quantile) function when constrained to pass through
> the origin… as with least squares fitting without an intercept, you do this at your peril.
>>
>>
>> On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker <[hidden email]> wrote:
>>
>>> On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
>>>
>>> Did you verify that the correct percentages were above/below the regression
>>> lines? I did a quick check and for example did not consistently get 50% of
>>> the observed response values greater than the tau=.5 line. I did when I
>>> included the nonzero intercept term.
>>
>> Your "correct percentages" are only correct when you have an intercept in the model,
>> without an intercept there is no gradient condition to ensure that.

[snip]

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Preetam Pal
In reply to this post by Roger Koenker-3
So, what does weighted quantile regression even aim to achieve? Invariably, this plane would not split the data set into the requisite fractions.....

-----Original Message-----
From: "Roger Koenker" <[hidden email]>
Sent: ‎06-‎10-‎2015 07:09 PM
To: "Lorenz, David" <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [R] Quantile Regression without intercept


> On Oct 6, 2015, at 8:32 AM, Lorenz, David <[hidden email]> wrote:
>
> Thanks for the details, I suspected something like that.
> I think that begs the question: what is the meaning of quantile regression through the origin? If the tau=.5 line does not pass through 1/2 the data how do I interpret the line?

As an estimate of the conditional median (quantile) function when constrained to pass through
the origin… as with least squares fitting without an intercept, you do this at your peril.

>
>
> On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker <[hidden email]> wrote:
>
> > On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
> >
> > Did you verify that the correct percentages were above/below the regression
> > lines? I did a quick check and for example did not consistently get 50% of
> > the observed response values greater than the tau=.5 line. I did when I
> > included the nonzero intercept term.
>
> Your "correct percentages" are only correct when you have an intercept in the model,
> without an intercept there is no gradient condition to ensure that.
> >
> >
> >
> >> Date: Mon, 5 Oct 2015 21:14:04 +0530
> >> From: Preetam Pal <[hidden email]>
> >> To: stephen sefick <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >> Message-ID: <[hidden email]>
> >> Content-Type: text/plain; charset="UTF-8"
> >>
> >> Yes..it works. .... Thanks ??
> >>
> >> -----Original Message-----
> >> From: "stephen sefick" <[hidden email]>
> >> Sent: ?05-?10-?2015 09:01 PM
> >> To: "Preetam Pal" <[hidden email]>
> >> Cc: "[hidden email]" <[hidden email]>
> >> Subject: Re: [R] Quantile Regression without intercept
> >>
> >> I have never used this, but does the formula interface work like lm? Y~X-1?
> >>
> >>
> >> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
> >> wrote:
> >>
> >> Hi guys,
> >>
> >> Can you instruct me please how to run quantile regression without the
> >> intercept term? I only know about the rq function under quantreg package,
> >> but it automatically uses an intercept model. Icant change that, it seems.
> >>
> >> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> >> Unemployment). Their sizes are 125 each.
> >>
> >> Appreciate your help with this.
> >>
> >> Regards,
> >> Preetam
> >>        [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Stephen Sefick
> >> **************************************************
> >> Auburn University
> >> Biological Sciences
> >> 331 Funchess Hall
> >> Auburn, Alabama
> >> 36849
> >> **************************************************
> >> [hidden email]
> >> http://www.auburn.edu/~sas0025
> >> **************************************************
> >>
> >> Let's not spend our time and resources thinking about things that are so
> >> little or so large that all they really do for us is puff us up and make us
> >> feel like gods.  We are mammals, and have not exhausted the annoying little
> >> problems of being mammals.
> >>
> >>                                -K. Mullis
> >>
> >> "A big computer, a complex algorithm and a long time does not equal
> >> science."
> >>
> >>                              -Robert Gentleman
> >>        [[alternative HTML version deleted]]
> >>
> >>
> >>
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Quantile Regression without intercept

Roger Koenker-3
In reply to this post by Roger Koenker-3

> On Oct 7, 2015, at 3:46 PM, Preetam Pal <[hidden email]> wrote:
>
> So, what does weighted quantile regression even aim to achieve? Invariably, this plane would not split the data set into the requisite fractions…..


This officially ties this thread into a loop, since the OP wants to know why he wanted to do what he originally
requested.   If one “knows” that the intercept is zero, then it is always good to impose this, but like I said one
does this at one’s peril.  An example from economics might help:  suppose you are estimating Engel curves
in an unwelfare state, so 0 income implies 0 expenditure, then all (quantile)  Engel curves pass through the origin and
one might want to impose this.  On the other hand maybe not...


> From: Roger Koenker
> Sent: ‎06-‎10-‎2015 07:09 PM
> To: Lorenz, David
> Cc: [hidden email]
> Subject: Re: [R] Quantile Regression without intercept
>
>
> > On Oct 6, 2015, at 8:32 AM, Lorenz, David <[hidden email]> wrote:
> >
> > Thanks for the details, I suspected something like that.
> > I think that begs the question: what is the meaning of quantile regression through the origin? If the tau=.5 line does not pass through 1/2 the data how do I interpret the line?
>
> As an estimate of the conditional median (quantile) function when constrained to pass through
> the origin… as with least squares fitting without an intercept, you do this at your peril.
> >
> >
> > On Tue, Oct 6, 2015 at 8:03 AM, Roger Koenker <[hidden email]> wrote:
> >
> > > On Oct 6, 2015, at 7:58 AM, Lorenz, David <[hidden email]> wrote:
> > >
> > > Did you verify that the correct percentages were above/below the regression
> > > lines? I did a quick check and for example did not consistently get 50% of
> > > the observed response values greater than the tau=.5 line. I did when I
> > > included the nonzero intercept term.
> >
> > Your "correct percentages" are only correct when you have an intercept in the model,
> > without an intercept there is no gradient condition to ensure that.
> > >
> > >
> > >
> > >> Date: Mon, 5 Oct 2015 21:14:04 +0530
> > >> From: Preetam Pal <[hidden email]>
> > >> To: stephen sefick <[hidden email]>
> > >> Cc: "[hidden email]" <[hidden email]>
> > >> Subject: Re: [R] Quantile Regression without intercept
> > >> Message-ID: <[hidden email]>
> > >> Content-Type: text/plain; charset="UTF-8"
> > >>
> > >> Yes..it works. .... Thanks ??
> > >>
> > >> -----Original Message-----
> > >> From: "stephen sefick" <[hidden email]>
> > >> Sent: ?05-?10-?2015 09:01 PM
> > >> To: "Preetam Pal" <[hidden email]>
> > >> Cc: "[hidden email]" <[hidden email]>
> > >> Subject: Re: [R] Quantile Regression without intercept
> > >>
> > >> I have never used this, but does the formula interface work like lm? Y~X-1?
> > >>
> > >>
> > >> On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <[hidden email]>
> > >> wrote:
> > >>
> > >> Hi guys,
> > >>
> > >> Can you instruct me please how to run quantile regression without the
> > >> intercept term? I only know about the rq function under quantreg package,
> > >> but it automatically uses an intercept model. Icant change that, it seems.
> > >>
> > >> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> > >> Unemployment). Their sizes are 125 each.
> > >>
> > >> Appreciate your help with this.
> > >>
> > >> Regards,
> > >> Preetam
> > >>        [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > >> 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.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >>
> > >> Stephen Sefick
> > >> **************************************************
> > >> Auburn University
> > >> Biological Sciences
> > >> 331 Funchess Hall
> > >> Auburn, Alabama
> > >> 36849
> > >> **************************************************
> > >> [hidden email]
> > >> http://www.auburn.edu/~sas0025
> > >> **************************************************
> > >>
> > >> Let's not spend our time and resources thinking about things that are so
> > >> little or so large that all they really do for us is puff us up and make us
> > >> feel like gods.  We are mammals, and have not exhausted the annoying little
> > >> problems of being mammals.
> > >>
> > >>                                -K. Mullis
> > >>
> > >> "A big computer, a complex algorithm and a long time does not equal
> > >> science."
> > >>
> > >>                              -Robert Gentleman
> > >>        [[alternative HTML version deleted]]
> > >>
> > >>
> > >>
> > >>
> > >
> > >       [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > > 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.
> >
> >
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.