Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Lacy,Michael" <Michael.Lacy@colostate.edu> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
Subject | st: Using -ml- for something other than a GLM |
Date | Wed, 7 Sep 2011 22:15:58 +0000 |
Greetings, I'm trying to use -ml- for the first time, but my particular problem is different enough from any of the examples I have seen that I am even more puzzled than a new -ml- user might be. My problem does not involve a generalized linear model, whereas all the examples I have found are for logit, probit etc. or other regression models. A description of my problem: I am implementing an approach to modeling agreement among subjects giving answers to multinomial response items. This approach models agreement in terms of a subject's latent ability to know the "right" answer to any given question. This vector of latent abilities for the N subjects is what is to be estimated. The likelihood is a function of the # of matches of the responses among each of all possible pairs of subject, not the response of any single subject: For a pair of subjects the log likelihood has the form: ln(a * P ) + (K-a)*ln(1-P) where a is the observed number of times a pair gave matching answers across all the questions, K is the number of questions, and P is the probability that the two subjects agreed on any given question. P is a linear function of the two subjects' latent abilities,D_i and D_j), and the number of answer options on each question, L: P = (L -1)(D_i * D_j)/L + 1/L I am fine as regards creating a program (Stata or Mata) that returns the log likelihood across all pairs of subjects as a function of the vector of unknowns D, but I don't see how to fit what I want into the framework of -ml-, which seems set up for regression models. At this point, I can't, for example, understand what would be the equation in an -ml model- statement. Other things will doubtless puzzle me as I get deeper into this :-} Can someone point me to an example I might try to follow, or perhaps sketch how this might fit in the framework of -ml- (or -moptimize- or -optimize-). Regards Mike Lacy, Ph.D. Assoc. Prof./Dir. Grad. Studies Dept. of Sociology Colorado State University Fort Collins CO 80523-1784 970.491.6721 (voice) * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/