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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.