Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: fit an exponential function


From   "JVerkuilen (Gmail)" <jvverkuilen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: fit an exponential function
Date   Sun, 18 Nov 2012 11:26:29 -0500

On Sun, Nov 18, 2012 at 10:55 AM, Carmen Blanco <blnco.mc@gmail.com> wrote:
> I have a scatter plot.
>
> I want to fit in the graph by an exponential curve.
>
> For example, to a linear function I use -lfit-  command  and I need to
> know how to do the adjustment with the exponential function.

I don't think there's a direct way to do it with a plot function. You
could fit an exponential model with nonlinear least squares (-nl-) or
a generalized linear model (-glm-), create predicted values, and then
use a connected line plot or some other interpolating function. I
haven't used the fractional polynomial interpolating fits so I don't
know enough about them to comment but if you just want a good smooth
curve interpolator, that may work too.

Jay
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index