The function regstats returns beta coefficients for a model of responses y from predictors x. For a quadratic model with one predictor, the model is simple:
b(1)*constant + b(2)*x + b(3)*x^2
(in that order, where b = stats.beta). However, as the number of predictors increases, it's not clear what order the beta coefficients are applied to the model. The model I'm interested in, for example, is quadratic with 3 predictor vectors, generating 10 beta coefficients. I can guess at what the model expansion would be, but is there any documentation on this (I couldn't find any)? Many thanks in advance!

 採用された回答

Wayne King
Wayne King 2011 年 10 月 12 日

0 投票

Hi Dave, you can use x2fx() to figure out what order your terms appear in.

1 件のコメント

dave matthews
dave matthews 2011 年 10 月 12 日
thanks - exactly what i needed.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSchedule Model Components についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by