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 Exchange에서 Linear 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