Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: AW: Problem with grqreg


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: AW: Problem with grqreg
Date   Tue, 23 Feb 2010 14:24:58 +0100

<> 


Thanks for the flowers! But I do have to dampen your enthusiasm: The full
column names alone don`t do it. For one, -postfile- chokes on the colons
thus introduced. You can get rid of those by using lines such as - local rhs
: subinstr local rhs ":" ""-, which enables -postfile- to run. But then you
hit other snags further down the line, e.g. when -grqreg- tries to obtain
-var labels- to adorn the y-axis of its graphs. I do not want to mess around
with somebody else`s ado, so let`s hope that the author updates the thing
based on the repeated problems reported in connection with -sqreg-. 



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael C.
Morrison
Gesendet: Dienstag, 23. Februar 2010 14:18
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: AW: Problem with grqreg

Thanks Martin for the excellent diagnosis and recommendation. Your 
contributions to this list are outstanding!

Mike


On 2/23/2010 7:10 AM, Martin Weiss wrote:
> <>
>
> The underlying problem is that _sqregtrace.ado, an auxiliary ado to -ssc d
> grqreg-, strips of the column names from the "e(b)" matrix returned by
> -sqreg-. The trouble is that for every quantile requested in the -q()-
> option to -sqreg-, the names will be repeated, as seen in this example
> featuring 3 quantiles:
>
>
> *************
> sysuse auto, clear
> sqreg price mpg rep78 headroom trunk, quantiles(50 75 90) reps(20)
> local rhs : colnames(e(b))
> di in r "`rhs'"
> *************
>
> This macro "rhs" is then fed to a call to -postfile- which, rightly,
> complains of duplicate entries.
>
> So the solution would be to prepend the "rhs" variables with the quantile
in
> question, which could be achieved by modifying the above call to - local
rhs
> : colfullnames(e(b))-.
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael C.
> Morrison
> Gesendet: Dienstag, 23. Februar 2010 04:34
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: Problem with grqreg
>
> I'm having a problem with grqreg.
>
> After running a quantile regression with:
>
>       sqreg  pincp  ageqtr retp schl_group semp sex wagp, q(.05 .10 .25
> .50 .75 .90 .95)
>
> I want to graph the coefficients of the quantile regression with grqreg
> with the following command:
>
>       grqreg, ci ols
>
> However, I receive the following error:
>
>       postfile: variable ageqtr already exists
>       r(110);
>
> (Note that "ageqtr" is the first independent var in the quantile
> regression.)
>
> All my variables have labels.
>
> Any help would be greatly appreciated. I'm using Stata version 11, 64
> bit, Windows 7.
>
> Mike
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index