フィルターのクリア

linear regression statistical parameters

1 回表示 (過去 30 日間)
Reza S
Reza S 2015 年 4 月 20 日
コメント済み: Reza S 2015 年 4 月 29 日
Hello,
This is a question following my previous one but I explain the problem here as well. I am trying to use linear and nonlinear regression to predict a response. I am wondering how I can get the most possible statistical results from regress or nlinfit (like durbin watson, probabilities, R2, adjusted R2, etc.).
y=(c.^4+2*c.*p+3*p.^3-c+2*d.^0.5)'; % a sample response
X = [c;p;d]';
beta0 = [1 -2 0 -1 0 1 1];
X = [ones(size(c)); c.^4 ;c.*p; p.^3 ;c; d.^0.5]';
[b,stats] = regress(y,X)
Results: b =
0
1.0000
2.0000
3.0000
-1.0000
2.0000
stats = (how to interpret these?)
0 0
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN

回答 (1 件)

Ahmet Cecen
Ahmet Cecen 2015 年 4 月 20 日
There is a good chance there are other things wrong with your problem, but first off, it is:
[b,bint,r,rint,stats] = regress(y,X)
not:
[b,stats] = regress(y,X)
in your case, your stats is actually bint...
if you do not want the other results, do this instead:
[b,~,~,~,stats] = regress(y,X)
  3 件のコメント
Ahmet Cecen
Ahmet Cecen 2015 年 4 月 21 日
編集済み: Ahmet Cecen 2015 年 4 月 21 日
Now your stats looks like its actually rint. Stats would look like:
stats=
number <- R2 statistic
number <- the F statistic
number <- p value of F statistic
number <- estimate of the error variance
Reza S
Reza S 2015 年 4 月 29 日
Thanks

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

カテゴリ

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