フィルターのクリア

How to use 'mle' function on multi-dimension vector represented by matrix?

3 ビュー (過去 30 日間)
Joy Tian
Joy Tian 2015 年 12 月 12 日
コメント済み: Joy Tian 2015 年 12 月 12 日
Hi everyone,
I want to try run mle to estimate parameters from a pdf function on a multi-column dataset. The number of rows are same.
Different columns represent data in different samples. But I don't know how to input it into ‘mle’ function
paramEsts = mle(x, 'pdf',mypdf, 'start',start, 'lower',lb, 'upper',ub);
x is a 10957x10 double matrix
It gave me feedback as follows
Error mle (line 210)
DATA must be a vector.
It seems that mle does not accept multidimensional vector. I felt that I very likely wrongly defined the data variable. But I don't know how to define it properly to be accepted by Matlab.

採用された回答

Walter Roberson
Walter Roberson 2015 年 12 月 12 日
paramEsts = arrayfun(@(IDX) mle(x(:,IDX), 'pdf',mypdf, 'start',start, 'lower',lb, 'upper',ub), 1:size(x,2), 'Uniform', 0)
  1 件のコメント
Joy Tian
Joy Tian 2015 年 12 月 12 日
Return the error
Error evaluating the user-supplied pdf function '@(x,p,lamda1,lamda2)p*exppdf(x,lamda1)+(1-p)*exppdf(x,lamda2)'.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProbability Distributions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by