Effacer les filtres
Effacer les filtres

Linear regression : estimate the parameters

2 vues (au cours des 30 derniers jours)
amine&&
amine&& le 18 Fév 2017
Commenté : Chad Greene le 18 Fév 2017
Hello! How can I estimate the parameters (beta1 and beata2) of the following model : y=beta1+beta2*x+epsilon Thanks.

Réponse acceptée

Chad Greene
Chad Greene le 18 Fév 2017
Use polyfit.
p = polyfit(x,y,1);
beta1 = p(2);
beta2 = p(1);
  2 commentaires
amine&&
amine&& le 18 Fév 2017
Modifié(e) : amine&& le 18 Fév 2017
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 le 18 Fév 2017
Check out the optional S output in polyfit, which has S.R and S.normr.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by