Linear regression : estimate the parameters

조회 수: 17 (최근 30일)
amine&&
amine&& 2017년 2월 18일
댓글: Chad Greene 2017년 2월 18일
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일
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개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by