[R] What to do with positive likelihoods
Michael.Turchin at childrens.harvard.edu
Wed Apr 20 04:13:49 CEST 2011
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,
Children's Hospital Boston
More information about the R-help