Iterative Maximization
2 ビュー (過去 30 日間)
古いコメントを表示
I have a function like P(t) in the form of:
P(t)= 1/ (1+exp(-ai*(t-bi)))
in which "ai" and "bi" are characteristics of item i and p(t) is probability of a correct answer to item i by a person with ability equal to "t". In practice we have a response pattern like "1101" in answering four items in which 1 means correct answer and 0 means incorrect answer. Then for finding person's ability who possesses such response pattern we use likelihood function in the form of:
L(t)= Ʃ (x*log(p(t)) * ((1-x)*log(1-p(t))) i=1,2,3,4,...
In which "x" is 1 or 0 with respect to the given response pattern. for the above example, likelihood function is:
L(t)= log (P1(t)) + log(P2(t)) +log(1-P3(t)) + log (P4(t))
(i.e. P1(t) stands for probability of item 1 and so on) The value of "t" which maximizes this equation is the person's ability who answered those four items. In practice the number items and persons are different. I want to know how I can write a program to do this procedure in MATALB. Suppose that I have four items (a 4 by 2 matrix so that the first column is "a" for each item and the second column is "b") and 61 different response patterns (a 61 by 4 matrix of 1 and 0).So, I should compute likelihood function for each response pattern then maximize it to find corresponding "t". This process should be done for each person.
I really appreciate any help.
Amin.
1 件のコメント
Walter Roberson
2011 年 12 月 18 日
61 different response patterns, or 16 ? There are only 16 different 4-bit values.
回答 (1 件)
Walter Roberson
2011 年 12 月 18 日
A start would be
R = dec2bin(0:15,4) - '0' + 1;
syms t
P = 1 ./ (1+exp(-ab(:,1)*(t-ab(:,2))));
Plog = log([P, 1-P]);
L = sum(Plog[R],2);
%and one would want to optimize each L separately
Unfortunately at the moment I cannot find a non-linear numeric maximizer in the Symbolic Toolkit.
You could use matlabFunction() on the negative each element of L and use one of the MATLAB minimizers on that.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!