Linear and power fitting of original and transformed data not reproducible

1 回表示 (過去 30 日間)
Xen
Xen 2020 年 1 月 30 日
コメント済み: Vladimir Sovkov 2020 年 1 月 30 日
I am fitting two variables that seem to have a power relationship (y=a*x^b). If I log-transform both variables, they should have a linear relationship (ln(y) = c*ln(x) + d. Notice that b=c and ln(a)=d. However, when I fit the power and linear equation to these, respectively, the estimated coefficients do not satisfy these relationships. Expectedly, R-square is also different. I tried changing the fit options and didn't manage to make the two fittings equivalent. Has anyone any idea why this happens?
PS. fitting in excel is satisfying these relationships and I get identical values
  3 件のコメント
Xen
Xen 2020 年 1 月 30 日
Thanks for the reply Vladimir. The weights of y are by default ones(n,1). How would you recompute the weights for ln(y)?
Vladimir Sovkov
Vladimir Sovkov 2020 年 1 月 30 日
The weights must be , however, it is better to check the documentation of the tool you are using.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by