Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Scatter Diagram with trend line

From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <>
Subject   Re: st: Scatter Diagram with trend line
Date   Mon, 8 May 2006 10:21:17 +0200

Jagath wants to draw a scatter diagram with a trend line on it

You can combine two or more plots in a single graph. Try this:

    sysuse auto.dta
    twoway (scatter mpg weight)(lfit mpg weight)

This gives the linear regression estimate. A smooth Lowess curve is
drawn by:

    twoway (scatter mpg weight)(lowess mpg weight)

Hope this helps

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796

*   For searches and help try:

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