Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: how to get a line (or scatter)graph alike the linkplot of Nick Cox?


From   "Tiago V. Pereira" <[email protected]>
To   [email protected]
Subject   st: how to get a line (or scatter)graph alike the linkplot of Nick Cox?
Date   Fri, 6 Jan 2012 16:11:49 -0200 (BRST)

I understand pretty well what José Maria has attempted to write, since I
am from Brazil.

You can use the twoway option, as illustrate below - assuming you don't
have a variable named x_id.


*/ -------------- start --------------------------------
cap drop x_id
egen x_id = group(id)
qui sum x_id, meanonly
local n = r(max)

forvalues i = 1/`n' {
local graph "(connected zpi age if x_id==`i') `graph'"
}

twoway `graph', legend(off)
*/ --------------end --------------------------------


Then, you may add options such as labels, fonts, etc, and edit the graph
using the Graph Editor.

Let me know if this helps.

All the best,

Tiago




*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index