lsqnonlin and true parameters value

조회 수: 3 (최근 30일)
Malgorzata Wieteska
Malgorzata Wieteska 2021년 3월 4일
댓글: Malgorzata Wieteska 2021년 3월 4일
Hi,
I'm trying to calculate true values of parameters and get an information about how good the found parameters are. For this I want to use lsqnonlin, while finding the parameters in my ODE. I wonder how to get:
a) least-squares optimal estimate of the parameter values;
b) Chi squared error;
c) asymptotic standard error of the parameters;
d) asymptotic standard error of the result of the simulation;
e) correlation matrix of the parameters;
f) convergence history;
g) R-squared coeeficient of multiple determination;
while using lsqnonlin. Any suggestions will be appreciated. Thanks in advance, Malgosia

채택된 답변

Alan Weiss
Alan Weiss 2021년 3월 4일
I can help you with a) and f), but for the rest you will have to look elsewhere.
The examples Fit ODE, Problem-Based and Fit an Ordinary Differential Equation (ODE) show two ways of finding a fit to an ODE" problem-based or solver-based. To look at the convergence history, set the Display option to 'iter' before you call solve in the first example or lsqcurvefit in the second:
opts = optimoptions('lsqnonlin','Display','iter');
[rsol,sumsq] = solve(prob,r0,'Options',opts) % first case
% or
opts = optimoptions('lsqcurvefit','Display','iter');
[xbest,resnorm,residual] = lsqcurvefit(@fitlorenzfn,x0,tspan,a,lb,ub,opts);
The values in rsol or xbest are tthe least-squares parameter values. sumsq or resnorm are the resulting sum of squared residuals.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
Malgorzata Wieteska
Malgorzata Wieteska 2021년 3월 4일
Thank you Alan, this will help me to make progress. I will try to find what I can calculate also from nlparci result to crack the other points.
Thanks once again, Malgosia

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by