[Lign251] binom.bayes
Roger Levy
rlevy at ucsd.edu
Sun Nov 2 16:17:47 PST 2008
Tristie Ross wrote:
> > Hi Roger,
> >
> > I'm having a problem with the binom.bayes function. I keep getting an
> > error message when I input 10000 trials. The thing is that I don't get
> > an error message when I do the same thing with less trials. Am I doing
> > something wrong or is this a problem with binom.bayes?
> >
> > Thanks,
> >
> > Tristie
> >
> > binom.bayes(7000,10000,prior.shape1=5, prior.shape2=5)
> > method x n shape1 shape2 mean lower upper sig
> > 1 bayes* 7000 10000 7005 3005 0.6998002 0.5165654 0.8476515 0
> > Warning message:
> > In binom.bayes(7000, 10000, prior.shape1 = 5, prior.shape2 = 5) :
> > 1 confidence interval failed to converge (marked by '*').
> > Try changing 'tol' to a different value.
Hi Tristie,
Good question. This seems to be an issue with binom.bayes -- and
without delving into the code for binom.bayes directly, I can't be
exactly sure what's causing it. However, it seems to have to do with
the tolerance argument "tol" -- unfortunately, the documentation doesn't
tell exactly what this argument does. If you lower tol, then things seem
to work again:
> > binom.bayes(7000,10000,prior.shape1=5, prior.shape2=5,tol=1e-10)
method x n shape1 shape2 mean lower upper sig
1 bayes 7000 10000 7005 3005 0.6998002 0.6907842 0.7087406 0.05
which is a pretty sensible result (very peaked posterior around ~0.7).
Roger
-- Roger Levy Email: rlevy at ling.ucsd.edu Assistant Professor Phone:
858-534-7219 Department of Linguistics Fax: 858-534-4789 UC San Diego
Web: http://ling.ucsd.edu/~rlevy
More information about the Lign251
mailing list