Can't manage to set up an optimization problem in Matlab 2021b from Excel

조회 수: 1 (최근 30일)
Barbab
Barbab 2021년 12월 8일
답변: Cris LaPierre 2021년 12월 24일
Hi, I will use silly data to explain my problem. I would like to estimate the parameters (mu and sigma in my example) of a statistical distribution with simulations (bootstrap). Let assume that I have the vector x of the observed data, sampled from a distribution with unknown population parameters mu and sigma:
mu = 50;
sigma = 1;
N = 100;
x = norminv(rand(N,1),mu,sigma) % my observations vector – simulated only for only for exemplification purpose
I would like to estimate the population parameters by simulating nSimul = 1000 extractions from the same distribution (in this case normal distribution) where the initial parameters are set equals to mu0and sigma0 by minimizing the sum of the absolute difference between or the sum of the squared difference between the observed vector and the simulated vector.
To explain myself better, in Excel I did like this:
I know that for the normal distribution it does not make sense, BUT I am interested in a more complicated statistical distribution and the main issue I am not able to overcome is the optimization problem setting with matlab, i.e. how to:
Minimize the sum of absolute differences between observations and the simulated vector by changing the parameters mu and sigma, starting from mu0 and sigma0, subject to a constraint (es. non negativity for the variance).

답변 (1개)

Cris LaPierre
Cris LaPierre 2021년 12월 24일
I would look into problem based optimization with MATLAB (requires Optimization Toolbox).
Here's a link to a quick-start "cheat sheet.
For more detailed help, see the related documentation.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by