wuzzy wrote: > [EMAIL PROTECTED] (Herman Rubin) wrote in message news:<[EMAIL PROTECTED]>... > >>In article <[EMAIL PROTECTED]>, >>Duncan Smith <[EMAIL PROTECTED]> wrote: >> >> >>>"wuzzy" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>>>I asked this elswhere, this group may be more appropriate, appologies >>>>for simple question? >>> >> >> >>>>Can someone describe an algorithm in MS Excel to find the posterior >>>>distribution given a likelihood function (=BINOMDIST) and a prior >>>>distribution (=NORMDIST mu=0, sigma=0.05)? >>>>I know that it is proportional to L*P (likelihood times prior). >>>>[anyone know how to calculate the denominator in excel?] >>> >> >> >>>>But what is an exact algorithm?! >>> >> >> >>>>For instance I was considering sampling 10 random parameters in ten >>>>columns >>>>of BINOMDIST()*NORMDIST(from 1..10) for each case. But what does this >>>>product tell me? how do I actually plot the distribution? >>> >> >> >>>>Thanks >>> >> >> >>>Does it make sense to have a Normal prior (particularly with mu=0) with a >>>Binomial likelihood? If a Beta prior makes at least as much sense it makes >>>the maths much easier. >> >> >> >>>Duncan >> > > True, I do expect to see alot of #DIV/0 with mu=0. > I've posted something like what I was looking for on > http://members.rogers.com/spsstutor/bayes.xls > (not sure if the site is up properly though) > > What I was trying to do (probably failed) is a bayesian logistic > regression.
Ah, have you forgotten to use a link function? Logistic regression uses a logit link function to go between the linear predictor (which variate between + and - infinity) and the probability (which varies between 0 and 1). Or, in practice: If eta ~ N(mu, sigma) then p = exp(eta)/(1+exp(eta)) If sigma is too large, then the prior for p is U-shaped. Bob -- Bob O'Hara Rolf Nevanlinna Institute P.O. Box 4 (Yliopistonkatu 5) FIN-00014 University of Helsinki Finland Telephone: +358-9-191 23743 Mobile: +358 50 599 0540 Fax: +358-9-191 22 779 WWW: http://www.RNI.Helsinki.FI/~boh/ . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
