Typos from the Og
Christian P. Robert
October 10, 2011
Introducing Monte Carlo Methods with R
1. (Thanks to Kazue Ishida, Japanese translator of the book) The demos for
chapters 2 and 5 do not work, due to an upgrade of R that invalidated
my (much) older
STA 6866: Monte Carlo Statistical Methods
Fall 2011
Prerequisite: STA 6166 and 6167 or permission of instructor.
Credits: 3
Course Coordinator Professor George Casella
Instructors:
Dr. Luis Leon-Novelo
Dr. Andrew Womack
[email protected][email protected]
a
STA 6866 Fall 2011 Solutions
Andrew Womack & Luis Leon-Novello
Assignment 1: Assigned Aug 22, Due Sep 7
Exercise 1.4:
We can best describe the dierences between order() and rank() through their use. Both
take in a numeric vector. order() returns a vector
Random Eects Model Notes
Andrew Womack
November 21, 2011
1
Basic Model
We have the following hierarchical model
yij |j , , 2 , 2 N (j , 2 )
j |, 2 , 2 N (, 2 )
where j = 1, . . . , J is our group index and i = 1, . . . , nj are the individuals
in group j
Christian Robert
Universit Paris-Dauphine
e
and
George Casella
University of Florida
Introducing Monte Carlo Methods with R
Solutions to Randomly-Numbered Exercises
January 15, 2010
Springer
Berlin Heidelberg NewYork
Hong Kong London Singapore
Milan Paris
MC methods: MH. Ch 6
Hw Ch 6. Metropolis-Hasting Algorithm
Explain clearly what you do. When describing the MH algorithm write which is your target
distribution f and the proposal q .
Ex 1.
The negative binomial density can be parametrized in terms of its
Approaches to the Bayesian Linear Model
Andrew Womack
November 14, 2011
1
Introduction
We consider models of the form
y = x +
(1)
where i N (0, 2 ). In general, if we have p possible covariates to include then there are 2p
possible models to consider and
Lab 2: Generating Random Variables
Andrew J. Womack
September 2, 2011
1
Probability Inverse Transformation
Write a function which has two inputs (N (a number of draws) and W which is an inverse
CDF F 1 ) with the following code. We will use the . input in
Lab 6: Optimization
Andrew J. Womack
October 7, 2011
1
One dimensional problem
Create a sample from an exponential distribution make a function evaluating the log likelihood.
1. Use optimize to nd the global maximum.
2. Use sampling over the positive real
Lab 1: Using R
Andrew J. Womack
Aug 26, 2011
1
Estimating the Moments of a Mixture Distribution
I have three measurement devices which you cannot distinguish. With equal probability, I will
hand you a device and ask you to make a measurement. With device
MC convergence MH. Ch 8. Not to turn in.
Hw Ch 8. Convergence
Explain clearly what you do and why you are making the (convergence) decision.
Ex 1.
According to exercise 1 in MH. Hw 6
a a 1
1
,
p ( | ) =
B(a , a /) (1 + )a +a /
and the integrated likelihoo
EM and Monte Carlo EM Algorithms
Andrew J. Womack
September 26, 28, and 30, 2011
Setup
We have observed data x and parameter . We wish to maximize
the (log) likelihood
L(|x ) = f (x |)
(|x ) = log (L(|x )
The problem is that the (log) likelihood is intrac
Sampling Importance Resampling (SIR)
Another method to simulate (almost) from f based on g
Assumption: f & g known up to a constant, i.e.
f = c1 and
f
g = c2 g
c1 , c2 > 0 unknown.
iid
1. Generate y1 , y2 , . . . , ym g
2. Compute
wj =
(yj )
f
(yj )
g
fo
Monte Carlo Methods with R: Monitoring Convergence [1]
Chapter 8: Monitoring Convergence of MCMC Algorithms
Why does he insist that we must have a diagnosis? Some things are not
meant to be known by man.
Susanna Gregory
An Unholy Alliance
This Chapter
We
Monte Carlo Methods with R: Gibbs Samplers [1]
Chapter 7: Gibbs Samplers
Come, Watson , come! he cried. The game is afoot.
Arthur Conan Doyle
The Adventure of the Abbey Grange
This Chapter
We cover both the two-stage and the multistage Gibbs samplers
Th
Monte Carlo Methods with R: MetropolisHastings Algorithms [1]
Chapter 6: MetropolisHastings Algorithms
How absurdly simple!, I cried.
Quite so!, said he, a little nettled. Every problem becomes very childish when once it is explained to you.
Arthur Conan
Monte Carlo Methods with R: Monte Carlo Optimization [1]
Chapter 5: Monte Carlo Optimization
He invented a game that allowed players to predict the outcome?
Susanna Gregory
To Kill or Cure
This Chapter
Two uses of computer-generated random variables to s
Monte Carlo Methods with R: Monte Carlo Integration [1]
Chapter 3: Monte Carlo Integration
Every time I think I know whats going on, suddenly theres another
layer of complications. I just want this damn thing solved.
John Scalzi
The Last Colony
This Chapt
Monte Carlo Methods with R: Random Variable Generation [1]
Chapter 2: Random Variable Generation
It has long been an axiom of mine that the little things are innitely the
most important.
Arthur Conan Doyle
A Case of Identity
This Chapter
We present pract
R Basics
Andrew J. Womack
August 22, 2011
Introduction
What R is:
Statistical Scripting Language
Free
Open Source
Flexible
Objects and Methods
What R is not:
The fastest computing language
Fool proof
Guaranteed
Why we are using R:
Free!
Lots of good user
STA 6866 Fall 2011 Assignments
Andrew Womack & Luis Leon-Novello
For all problems where coding is necessary, you must submit your code along with your
answers to any questions. Solutions must be well organized and easy to follow.
Assignment 1: Assigned Au