New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Computing in Statistics

by: Cullen Conn

Computing in Statistics 22S 166

Cullen Conn
GPA 3.72

Mary Cowles

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Mary Cowles
Class Notes
25 ?




Popular in Course

Popular in Natural Sciences and Mathematics

This 5 page Class Notes was uploaded by Cullen Conn on Friday October 23, 2015. The Class Notes belongs to 22S 166 at University of Iowa taught by Mary Cowles in Fall. Since its upload, it has received 26 views. For similar materials see /class/228076/22s-166-university-of-iowa in Natural Sciences and Mathematics at University of Iowa.

Similar to 22S 166 at UI

Popular in Natural Sciences and Mathematics


Reviews for Computing in Statistics


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/23/15
Practical Considerations for WinBUGS Users Kate Cowles PhD Department of Statistics and Actuarial Science University of lowa 223 166 Leacuze 15 Oct 22 2007 Using MCMC for Bayesian inference idealized sequence 0 specify a Bayesian model 0 construct a Markov chain whose target distribution is the joint posterior distribution of interest 0 run the chain until output converges in distribution to draws from the target distribution 0 base inference regarding unknown quantities in model on output of subsequent iterations of the chain Issues in MCMC use for Bayesian model tting 0 Deciding how many chains to run 0 Choosing initial values 0 Assessing whether sampler has converged 0 Choosing model parameterizations and MCMC algorithms that will lead to convergence in a reasonable amount of time 0 Using correlated samples for estimation and inference adjusting estimates of standard errors Convergence assessment 0 How many initial iterations need to be discarded in order that remaining samples are drawn from a distribution close enough to the true stationary distribution to be usable for estimation and inference burnrin 0 Has the sampler traversed the entire support of the posterior distribution 7 support 0 How many dependent samples are needed in order to pro vide the desired precision in estimation and inference variance NH gt4gtQO C Using MCMC for Bayesian inference more realistic sequence specify a Bayesian model construct a Markov chain whose target distribution is the joint posterior distribution of interest run one or more chains as long as you can stand it i assess convergence 0 retune model parameterization7 Markov chain algorithm7 priors7 etc 0 or increase number of iterations 0 return to step 3 or continue to step 5 as appropriate ibase inference regarding unknown quantities in model on portion of output identi ed during convergence assessment 7 Monte Carlo errors 0 decide whether to discard some initial burnrin iterations and use remaining sampler output for inference or take some corrective action gtk run more iterations gtk change parameterization of model Suggested steps in WinBUGS 0 run a minimum of 3 parallel chains from overdispersed ini tial values 0 monitor all unknown model quantities beginning from the rst iteration if not feasible to monitor all7 then monitor at least repr resentative samples of each kind of parameter 7 let WinBUGS help you determine how many early iterr ations to throw out for burnrin o inspect the following WinBUGS output to evaluate sampler performance 7 history plots autocorrelation plots Brooks7 Gelman7 and Rubin diagnostic Initial values 0 lnitial values are not like priorsl Priors are part of the model speci cation Priors must not be derived from the current dataseti lnitial values are part of the computing process lnitial values can be derived from the current dataset 0 Choosing initial values 7 Run more than one chain with initial values selected to give you information about sampler performance lnitial values may be generated from priors lnitial values may be based on frequentist estimates gtk eigi mle7 mle r 4 standard errors7 mle 4 standarde rrors o lnitial values may be chosen systematically to represent exr treme regions of the parameter space 0 lnitial values must be speci ed for variance components WinBUGS usually can automatically generate initial vale ues for other parameters 7 But its often advantageous to specify even those Wine BUGS can generate Convergence diagnostics 0 Statistical methods applied to the output of MCMC same plers in an effort to assess convergence 0 Gelman and Rubin 1992 Early diagnostic comparing variance between within multiple chains frequires running multiple parallel chains from overdisr persed initial values 7 applied to each univariate quantity of interest always applied to last half of sampler output ire7 asr sumes that rst half of sampler output is burnrin computes potential scale reduction factor the factor by which the scale parameter of the estimated marginal distribution might shrink if sampling were continued in de nitely History plots Early graphical methods of convergence assessment 0 trajectories of sampler output for each model unknown 0 can quickly reveal failure to reach stationarity 0 can give qualitative information about sampler behavior 0 cannot con rm that any of the three aspects of convergence have occurred 0 Brooks and Gelman 1998 corrected computation of Gelman and Rubin 1992 po tential scale reduction factor propose a multivariate potential scale reduction factor to simultaneous assessment of convergence of all model unknowns extended method to other measures besides estimate of posterior variance7 particularly widths of credible sets GelmanRubin convergence diagnostic in WinBUGS o obtain in graphical form using GRdiag button on lnferr ence menu 0 plots the following versus iteration width of central 80 interval constructed from pooled runs plotted in green 7 average width of 80 intervals constructed from each run plotted in blue 7 ooled 7 ratio R i in red 0 both widths are scaled so maximum values are 1 0 convert plot to numeric output by doubleclicking on plot Monte Carlo error 0 on Stats output 0 similar to standard error of the mean7 but adjusted for aur tocorrelated sample 0 it will get smaller as more iterations are run 0 use it to guide your decision as to how many iterations you need to run after burnrin is done i then controlrleftrmouseeclick on the window 0 want to see BGR R value of numeric diagnostic close to 1 convergence of both pooled and withinrinterval widths to stability Software for MCMC convergence assessment 0 Rudimentary facilities built into WinBUGS 0 BOA Bayesian Output Analysis 7 developed in 1999 by Brian Smith of University of lowa includes all the convergence diagnostics output analysis features in WinBUGS and much more 7 available for free download from httpwwwpublic healthuiowaeduBDA use Coda button on WinBUGS lnference menu to ex port WinBUGS output to a le that BOA can process 0 downside by de nition canned software cannot perform problemrspeci c convergence assessment procedures Recommendations 0 Monitor 0 Learn as much as possible about model before ever running all types Of mOdel parameters7 not only parameters of an MCMC samplerl substantive interest 7 maximum likelihood sample Paths graphically noniterative Bayesian approximations aUtOCOIVIVQla DIODS 7 numerical mode ndjng crossrcorrelations between parameters 7 simpli ed models 0 Apply more than one diagnostic7 including one or more that o Prerassess burnrin time if possible then run a single chain uses Informatlon abom the Spea c mOdel how to do this is beyond scope of this course o If this is not possible7 run a small number 3 7 5 of parallel chains from overdispersed starting values Conclusions 0 MCMC methods have enabled the tting of complex7 realr istic models 0 Use of MCMC methods requires careful attention to 7 model parameterization MCMC sampler algorithms 7 choice of initial values 7 convergence assessment 7 output analysis 0 Ongoing research in theoretical veri cation of convergence7 MCMC acceleration7 and exact sampling holds great promise


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.