I was trying to resist responding to this question since the original

questioner

had already been admonished twice last october about asking questions

on R-help about posted code that was not only not a part of R-base,

but not even a part of an R package. But the quoted comment about

Stata is too enticing a provocation to resist.

First, it should be said that omitting intercepts in any regression

setting

should be undertaken "at one's peril" it is generally a very dangerous

activity, somewhat akin to fitting interactions without main effects,

but if

there is a good rational for it, it is no different in principle for

median

regression than for mean regression. It may well be that Stata

prohibits

this sort of thing out of some sort of paternalistic motive, but in R

the

usual formula convention y ~ x1 + x2 -1 suffices. Of course it

situations

in which such a formula is used for several quantiles it should be

understood

that it is forcing each conditional quantile function through the origin

effectively implies that the conditional distribution degenerates to a

point

mass at the origin.

Second, I would like to remark that "closed-form solutions" are in

the eye

of the beholder, and many people who can recall the infamous formula:

betahat = (X'X)^{-1} X'y

would be hard pressed to dredge up enough linear algebra to use the

formula for anything more than the bivariate case on the proverbial

desert island without the aid of their trusty laptop "Friday".

Finally, cbind(1,x) does introduce an intercept in the code

originally asked

about, so if you don't want an intercept don't do that, but be sure

that that is

really want you want to do.

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 Champaign, IL 61820

On Apr 26, 2009, at 6:35 AM, Tirthankar Chakravarty wrote:

> This is a nontrivial problem. This comes up often on the Statalist

> (-qreg- is for cross-section quantile regression):

> "

> You want to fit a plane through the origin using the L-1 norm.

> This is not as easy as with L-2 norm (LS), as it is more

> than a matter of dropping a constant predictor yet otherwise using the

> same criterion of fit. You are placing another constraint on a

> problem that already does not have a closed-form solution,

> and it does not surprise me that -qreg- does not support this.

> " (N.J. Cox)

>

http://www.stata.com/statalist/archive/2007-10/msg00809.html>

> You will probably have to program this by hand. Note also the

> degeneracy conditions in Koenker (2003, pg. 36--). I am not sure how

> this extends to panel data though.

>

> References:

> @book{koenker2005qre,

> title={{Quantile Regression; Econometric Society Monographs}},

> author={Koenker, R.},

> year={2005},

> publisher={Cambridge University Press}

> }

>

> T

>

> On Sun, Apr 26, 2009 at 8:24 AM, Helen Chen <

[hidden email]>

> wrote:

>>

>> Hi,

>>

>> I am trying to estimate a quantile regression using panel data. I

>> am trying

>> to use the model that is described in Dr. Koenker's article. So I

>> use the

>> code the that is posted in the following link:

>>

>>

http://www.econ.uiuc.edu/~roger/research/panel/rq.fit.panel.R>>

>> How to estimate the panel data quantile regression if the regression

>> contains no constant term? I tried to change the code of

>> rq.fit.panel by

>> delect "X=cbind(1,x)" and would like to know is that correct ?

>>

>>

>> Thanks

>> I really would appreciate some suggestions.

>> Best

>> Helen Chen

>> --

>> View this message in context:

http://www.nabble.com/Question-of-%22Quantile-Regression-for-Longitudinal-Data%22-tp23239896p23239896.html>> Sent from the R help mailing list archive at Nabble.com.

>>

>> ______________________________________________

>>

[hidden email] 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.

>>

>

>

>

> --

> To every ω-consistent recursive class κ of formulae there correspond

> recursive class signs r, such that neither v Gen r nor Neg(v Gen r)

> belongs to Flg(κ) (where v is the free variable of r).

>

> ______________________________________________

>

[hidden email] 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.

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide

http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.