R中的指数增长函数-拟合数据

问题描述 投票:1回答:1

我有以下数据:

> x = 1:40
> y =
 5    6   28   30   31   34   39   48   63   70   82   91  107  112  127  146  171  198  258  334  403  497  571  657  730  883 1024 1139
1329 1635 2059 2545 3105 3684 4289 4778 5351 5916 6729 7600

enter image description here

如何计算R中此图的指数函数(包括系数和常数?)>

我具有以下数据:> x = 1:40> y = 5 6 28 30 31 34 39 48 63 70 82 91 107 112 127 146 171 198 258 334 403 403 571 657 730 883 1024 1139 1329 1635 ...

statistics curve-fitting modeling exponential data-fitting
1个回答
1
投票

在您的帖子中,您只有y的38个值,所以我基本上假设x为1:38。如果为y = exp(ax+b),则可以将其更改为log(y) = ax + b并拟合线性模型。以下将使用正确的值:

© www.soinside.com 2019 - 2024. All rights reserved.