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-tp24595358p24596434.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.