フィルターのクリア

How to calculate the log likelihood of a fit

3 ビュー (過去 30 日間)
Marco Borges
Marco Borges 2016 年 6 月 24 日
I wonder how to calculate the log likelihood value given a general fit on Matlab, for example: what is the log likelihood of the fit results of this data?
xData = linspace(1,10,1000)';
yData = xData + randn(1000,1);
%%Fit: 'Linear'
% Set up fittype and options.
ft = fittype( 'T0+T1*D', 'independent', 'D', 'dependent', 'T' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.Robust = 'Bisquare';
opts.StartPoint = [0.568823660872193 0.469390641058206];
% Fit model to data.
[fitresult, gof] = fit( xData, yData, ft, opts );

回答 (0 件)

カテゴリ

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