フィルターのクリア

Compute log likelihood after fitting the GLM?

1 回表示 (過去 30 日間)
Marris Atwood
Marris Atwood 2015 年 6 月 9 日
編集済み: Marris Atwood 2015 年 6 月 9 日
I am playing around with a toy general linear model (GLM) with MATLAB glmfit.
X=[1;2;3;4];
y=[1.1;2.2;3.5;4.9];
[b, dev, stats] = glmfit(X, y);
How should I compute the log likelihood of the data? I want to do
y_fit = glmval(b, X, 'identity');
ll = nansum(log(normpdf(y, y_fit, sigma)));
But how to find sigma, the standard deviation of the Gaussian?

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by