[R] What to do with positive likelihoods

From: Turchin, Michael <Michael.Turchin_at_childrens.harvard.edu>
Date: Tue, 19 Apr 2011 22:13:49 -0400

Hi all,

I'll preface this with saying I've gone through the archives, and am still in need of some help.

I've been using this likelihood model with mean = 0 and s.d. = sqrt( (c + ( 1 / N1 ) + ( 1 / N2 ) ) * x * ( 1 - x )), where c is a genetic drift parameter (usually very small, like between .005 - .001), N1 and N2 are my population sizes (~200), and x is a value between 0 and 1. The values I'm testing are usually between -.25 to .25, so my command looks like

dnorm(.1, 0, sqrt( (c + ( 1 / N1 ) + ( 1 / N2 ) ) * x * ( 1 - x )))

Originally, I was doing this over multiple data points at once, summing up the values I was going to test and their variances, and just running the likelihood on these summed values once (getting one final likelihood in return). I've recently switched this over to running the likelihood on each data point and its associated variance one at a time, and summing the likelihoods afterwards. However, upon doing this, I'm now getting positive likelihoods since the individual variances are so small (.01 to .09, for instance). I'm not sure what to do, because I think these small variances are messing up the behavior of my final data -- the patterns I'm getting are not what I expected, whereas my previous method of summing multiple data points and just taking one likelihood value did return what I expected.

I'm not sure if getting positive likelihoods somewhat implies that the behavior of the model / results are off. Should I be using a different function than dnorm, now that my variances are so small? Using pnorm instead returns my data to what's expected, but my understanding is that pnorm gets me a probability now, not a likelihood. Could I use the output from pnorm in a likelihood ratio test (which was my original plan)?

Thanks for any help,
~Michael Turchin
Children's Hospital Boston

R-help_at_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. Received on Wed 20 Apr 2011 - 02:18:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Apr 2011 - 08:00:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive