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

From |
Miranda Kim <mk@mrc.soton.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Plotting several polynomials on the same graph |

Date |
Fri, 17 Jul 2009 16:25:11 +0100 |

Thanks a lot for this!

Many thanks, Miranda Maarten buis wrote:

--- On Fri, 17/7/09, Miranda Kim <mk@mrc.soton.ac.uk> wrote:I have three variables that hold coefficients for polynomials (such that each row contains three coefficients for a simple polynomial y=a+bx+cx^2). I want to draw all polynomials (10 rows) on the same graph. Then (if possible) I have three variables that hold three points that lie on the graph (each row contains three points that lie on the polynomial that is defined by the coefficients on that row), I’d like to plot these too (on the same graph).Does this solve your first question? *-------------- begin example ------------------- input a b c 1 2 3 2 3 4 end twoway function y = a[1] + b[1]*x + c[1]*x^2, /// range(-3 3) || ///function y = a[2] + b[2]*x + c[2]*x^2, ///range(-3 3)*---------------- end example -------------------I don't understand the data structure involved inyour second question: a point on that curve shouldbe defined by two values: and x coordinate and ay coordinate. If you have those you can use-scatter- as an overlay plot within the exampleI gave above. You could also consider the-xline()- or -yline()- options.Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://home.fsw.vu.nl/m.buis/ -----------------------------------------* * 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/

**References**:**Re: st: Plotting several polynomials on the same graph***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**Re: AW: st: interpretation of FE model with interaction of 2 dummies with continuous variable** - Next by Date:
**Re: st: gllamm with pweights** - Previous by thread:
**Re: st: Plotting several polynomials on the same graph** - Next by thread:
**RE: Re: st: Plotting several polynomials on the same graph** - Index(es):

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