Hi, I have the following problem: I am working on assessing the accuracy of diagnostic tests. I have a log likelihood and 3 unknown parameters. Now I want to apply the EM algorithm to find the maximum likelihood estimates of these parameters. But I don't know anaything about how to code that in R. Can somebody help me?? Greats, Elena -- View this message in context: http://www.nabble.com/EM-algorithm-tp24595358p24595358.html Sent from the R help mailing list archive at Nabble.com.
Hi, two useful references for beginning: www.stat.umn.edu/geyer/5931/mle/mle.pdf www.unc.edu/~monogan/computing/r/MLE_in_R.pdf Andrej Elena 5/12 wrote:> Hi, > > I have the following problem: I am working on assessing the accuracy of > diagnostic tests. I have a log likelihood and 3 unknown parameters. Now I > want to apply the EM algorithm to find the maximum likelihood estimates of > these parameters. But I don't know anaything about how to code that in R. > > Can somebody help me?? > > Greats, > Elena
l=?_i?_k log[ (Se(i))^(t_ik ) [1-Se(i) ]^(1-t_ik ) p+(Sp(i))^(1-t_ik) [1-Sp(i) ]^(t_ik ) (1-p)] This is my observed loglikelihood. It is a sum over i (there are I tests) and over k (K patients). t_ik is the result for the kth patient on the ith test. Se(i)= sensitivity, Sp (i)= specificity and p=prevalence are my unknown parameters. Do you know how to code this loglikelihood and EM algorithm in R? I can't get it to work. Thanks! -- View this message in context: http://www.nabble.com/EM-algorithm-tp24596478p24596478.html Sent from the R help mailing list archive at Nabble.com.
l=?_i?_k log [(Se(i))^(t_ik ) [1-Se(i) ]^(1-t_ik ) p+(Sp(i))^(1-t_ik ) [1-Sp(i) ]^(t_ik ) (1-p)] This is my loglikelihood. It is a sum over i (I tests) and over k (K patients). t_ik is the test results for the ithe test for the kth patient. Se(i)=sensitivity of test i, Sp(i)=specificity of test i and p=prevalence are my three unknown parameters. Now I need to apply the EM algorithm to this l to become estimates for these parameters. But I am not able to code it in R, it does not work. Do you know how to code this likelihood and the EM algorithm? -- View this message in context: http://www.nabble.com/EM-algorithm-tp24596990p24596990.html Sent from the R help mailing list archive at Nabble.com.