Linear regression : estimate the parameters

Hello! How can I estimate the parameters (beta1 and beata2) of the following model : y=beta1+beta2*x+epsilon Thanks.

 採用された回答

Chad Greene
Chad Greene 2017 年 2 月 18 日

0 投票

Use polyfit.
p = polyfit(x,y,1);
beta1 = p(2);
beta2 = p(1);

2 件のコメント

amine&&
amine&& 2017 年 2 月 18 日
編集済み: amine&& 2017 年 2 月 18 日
Thank Chad, but I want to know also information about the law following the resudiel (epsilon), the value of the coefficient R ^ 2 and other information.And how I can have confidence interval estimates for these parameters
Chad Greene
Chad Greene 2017 年 2 月 18 日
Check out the optional S output in polyfit, which has S.R and S.normr.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLinear and Nonlinear Regression についてさらに検索

質問済み:

2017 年 2 月 18 日

コメント済み:

2017 年 2 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by