******************************************************* README - Changes in LearnBayes 2.0 (from LearnBayes 1.0) December 15, 2008 ****************************************************** 1. Changes to function laplace This function now uses the more robust Nelder-Mead algorithm implemented in the optim function in the base package. The function has only three inputs, logpost, starting value, and data used in the logpost function. There is one additional output -- converge (TRUE or FALSE) that indicates if the Nelder-Mead algorithm converged. 2. Changes to the coding of the log posterior functions The definitions of the sample log posteriors have been simplified to accept vector (instead of matrix) inputs for the parameter. With this change, it is not necessary to use loops in the function definition. The following functions have been changed: betabinexch0, betabinexch, bfexch, cauchyerrorpost, groupeddatapost, howardprior, lbinorm, logctablepost, logisticpost, normchi2post, poissgamexch, transplantpost, weibullregpost. 3. Changes to the functions that operate on posteriors Generally these functions have been made more user friendly by allowing the starting value to be a vector instead of a row matrix. Changes have been made to laplace, indepmetrop, and rwmetrop 4. Change to function groupeddatapost There was a small error in this function in LearnBayes 1.0 that has been corrected. Also the data input to this function is now a list with three components, the vector of left bin boundaries int.lo, the vector of right bin boundaries int.hi, and the vector of bin boundaries f. 5. New functions New functions have been added and there have been changes to current functions -- most of the new functions and current functions are described in the second edition of Bayesian Computation Using R. ---------------------------------------------- Chapter 2 -- Introduction to Bayesian Thinking ----------------------------------------------- beta.select -- for binomial sampling, finds the shape parameters of a beta density that matches knowledge of two quantiles of the distribution. predplot -- for binomial sampling and a beta prior, this will graph the prior predictive distribution and show the observed data value triplot -- this will produce the popular "likelihood, prior, posterior" plot for binomial sampling with a beta prior ------------------------------------ Chapter 3 -- Single Parameter Models ------------------------------------ binomial.beta.mix -- this performs the posterior calculations for binomial sampling and a prior that is a mixture of beta densities poisson.gamma.mix -- this performs the posterior calculations for Poisson sampling and a prior that is a mixture of gamma densities normal.normal.mix -- this performs the posterior calculatiosn for normal sampling (known variance) with a prior that is a mixture of normal densities normal.select -- Finds the mean and standard deviation of a normal density that matches knowledge of two quantiles of the distribution. rigamma -- Simulates from a inverse gamma (a, b) distribution with density proportional to $y^{-a-1} exp(-b/y)$ ---------------------------------- Chapter 4 -- Multiparameter Models ---------------------------------- normpostsim -- this produces a sample from the posterior of (mean, variance) for normal sampling with a noninformative prior normpostpred -- this simulates the posterior predictive distribution of a statistic for a normal sampling problem bayes.probit -- this produces a simulated sample from the posterior for a probit regression model with a normal prior on the regression coefficient ------------------------------ Chapter 9 -- Regression Models ------------------------------ bayes.model.selection -- given a regression model with multiple covariates, this will compute the marginal density for each possible model using Zellner's G priors blinreg -- Computes the log posterior of (beta, log sigma) for a normal regression model. This function nows allows for the input of Zellner's g prior with parameters beta0 and c0 bradley.terry.post -- Computes the log posterior density of the talent parameters and the log standard deviation for a Bradley Terry model with normal random effects reg.gprior.post -- Computes the log posterior of (beta, log sigma) for a normal regression model with a g prior with parameters beta0 and c0. ---------------------------- Chapter 10 -- Gibbs Sampling ---------------------------- bayes.probit -- this function now allows the input of a multivariate normal prior and will compute the log marginal likelihood when an informative prior is used rtruncated -- this produces a sample of size n from a known distribution (normal, beta, gamma, etc) that is truncated between two values ******************************************************************************