Skip to content

how to fit exponential curve such as a*b^t in r?

3 messages · 水静流深, Berend Hasselman, Jeff Newmiller

#
On 16-12-2013, at 08:52, ???? <1248283536 at qq.com> wrote:

            
Have you looked at ?nls.
Have you simply tried

nls(y~a*b^t,data=dat)

You can also do a linear regression  on  log(y) ~ A + B* t.
And afterwards transform to the original coefficients.

Berend
Please do not post in html.
#
Read the examples section of

?nls

You probably need to provide a start list of values.

There are some points you should note from the Posting Guide mentioned in the footer of emails on this list: this is not a homework help forum, you should provide a reproducible example, and you should not post in HTML format.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
"????" <1248283536 at qq.com> wrote: