Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: grqreg for Stata 7


From   Puja Vasudeva <[email protected]>
To   [email protected]
Subject   st: RE: grqreg for Stata 7
Date   Wed, 27 Oct 2004 11:33:31 +0100

Thanks very much for this tip, Nick. It worked fine, provided the locals were defined first:
local x1: word count `rhs'
local x2: word count `varlist'
if `x1' <= `x2' {
local graphvars "`rhs'"
}

.. and then I run into problems with the graph command. This is the Stata 8 version:

graph twoway `cicmd' `olscmd' `olscicmd' (scatter `name' qtile,c(l)
legend(off) msize(tiny) clwidth(medthick) title(`tname') ytitle(`varlab') xtitle(Quantile) nodraw name(`graphname', replace))

Stata 7 doesn't support this syntax but I can't seem to figure out how to translate this. Any ideas would be much appreciated.
Sorry, I know this is asking a bit much and I should upgrade like the
rest of the world....

Puja



Date: Tue, 26 Oct 2004 14:47:53 +0100
From: "Nick Cox" <[email protected]>
Subject: st: RE: grqreg for Stata 7

The code

if wordcount("`rhs'")<=wordcount("`varlist'") {
local graphvars "`rhs'"
}

can be translated

if `: word count `rhs'' <= `: word count `varlist'' {
local graphvars "`rhs'"
}

This should work in Stata 7 too. It may not be
documented for 7. Make sure you use the correct single
quotes.

Of course, you should upgrade to Stata 8 too....

Nick
[email protected]

Puja Vasudeva

I found mention of grqreg.ado in the Statalist archives for
graphing the
coefficients of a quantile regression
(<http://www.stata.com/statalist/archive/2004-01/msg00552.html>).

My problem is that I use Stata 7 and this ado file was
written for Stata 8.
I can change most of the syntax to make it run in Stata 7 -
except the
function "wordcount".  Does anyone have a modified version to
run on Stata
7? Failing that, can anyone tell me the Stata 7 equivalent of
wordcount?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index