Drawings
Drawings
Learning outcomes:
1/22
Using simulations
2/22
Random Draws: Standard Normal and Uniform
3/22
How to draw from a univariate density
1 = F −1 (µ1 )
4/22
A graphical representation from Kenneth Train’s book
5/22
Application: normal distribution
• We want draws such that ŷr ∼ N µy , σy2 .
ŷr = µy + σy υ̂r
6/22
Application: lognormal distribution
• We want draws such that ln(x̂r ) ∼ N µy , σy2 .
7/22
Truncated Univariate Densities (i)
8/22
Truncated Univariate Densities (ii)
•P1: Since
JYD/... µ̄ is between F (a) and F (b), is necessarily between a and b.
CB495-09Drv CB495/Train KEY BOARDED May 25, 2009 16:32 Char Count= 0
• Essentially, the draw of µ determines how far to go between a and b.
• Note that the normalizing constant k is not used in the calculations
and therefore need not be calculated.
208 Estimation
F (ε)
F (b)
μ1
F (a)
ε
f (ε)
a ε1 b ε 9/22
Figure 9.2. Draw of μ̄1 between F(a) and F(b) gives draw ε1 from f (ε)
Truncated Univariate Densities (iii)
10/22
Multivariate Normals (i)
11/22
Multivariate Normals (ii)
1 s11 0 0 η1
2 = s21 s22 0 η2
3 s31 s32 s33 η3
or
1 = s11 η1
2 = s21 η1 + s22 η2
3 = s31 η1 + s32 η2 + s33 η3
" #
Z ∞ Y
f (yi1 , . . . , yiT | xi1 , . . . , xiT , β) = f (yit | xit , β, α) g (α) dα
−∞ t
PR Q
r =1 [ t f (yit | xit , β, α
br )]
f (yi1 , . . . , yiT | xi1 , . . . , xiT , β) ≈
R
13/22
The crude frequency estimator of f (yi1 , . . . , yiT | xi1 , . . . , xiT , β)
PR Q
r =1 [ t f (yit | xit , β, α
br )]
f (yi1 , . . . , yiT\
| xi1 , . . . , xiT , β) =
R
14/22
How large is an “arbitrarily” large number of random draws?
15/22
Coverage
16/22
Variance reduction
18/22
Halton sequences
20/22
How to get Halton draws in Stata
21/22
Useful references
22/22