Michael Cha
>
> Would anyone show me how to input IDs instead of dots in the qqplot?
>
> With a graph command, I can do it as follows.
>
> graph Y X, s([id])
>
> However,
>
> qqplot Y X, s([id])
>
> gives me an error message of "sy() invalid, r(198).
>
It happens that with -qqplot- the -symbol()- option
is wired in as -sy(oi)-, and so the help is misleading
in stating that any graph option may be used. That's
why you got that error message.
But this is the lesser of two problems.
The greater problem is this. -qqplot Y X- plots
lowest Y vs lowest X
next lowest Y vs next lowest X
...
highest Y vs highest X.
Take the first pair. In general, the identifier of Y will
differ from the identifier of X and so you have two identifiers
to play with. A graph could be drawn such that they were
superimposed but it would be a mess. A graph could be drawn
so that both labels are readable. Both would take some programming.
It is possible that the identifiers are always the same for
each pair, namely, whenever there is a perfect positive monotonic
relationship
connecting Y and X, for which the Spearman rank correlation is 1.
In this case the QQ plot is identical to the scatter plot of Y vs X,
and you can get what you want by
graph Y X , sy([id])
and that graph also shows well the case of a perfect negative monotonic
relationship.
Nick
[email protected]
*
* 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/