フィルターのクリア

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

4 ビュー (過去 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 Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by