Regstats for a regression on a linear term only

1 回表示 (過去 30 日間)
Mai
Mai 2013 年 4 月 30 日
I want to regress Y on a linear term only (y = ax). I want the t-statistic of this regression, so I want to use regstat.
Does anyone know what I should do, to make a regression without the constant term?

回答 (1 件)

Leah
Leah 2013 年 4 月 30 日
"Alternatively, model can be a matrix of model terms accepted by the x2fx function. See x2fx for a description of this matrix and for a description of the order in which terms appear. You can use this matrix to specify other models including ones without a constant term."
I would use the new linear model class http://www.mathworks.com/help/stats/linearmodel.fit.html LinearModel.fit
'Y ~ X - 1' is a three-variable linear model without intercept.

カテゴリ

Help Center および File ExchangeModel Building and Assessment についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by