17  A Single-Agent Entry Model

Our first prototype dynamic discrete choice model comes from industrial organization. We have actually met this model already: the entry-exit model is a dynamic discrete choice model with an added layer of strategic interaction. To keep things simple, we will start here with a single-agent version of the model, and return to the game in the chapter on CCP estimators. This model will also serve as the running example for our part on unobserved heterogeneity.

The model is useful for illustrating three things: how to solve an infinite-horizon model efficiently, how to estimate it by nested fixed point, and how normalizations of payoffs can matter for interpretation and for counterfactuals.

17.1 The Model

Consider a single firm (a monopolist) deciding each period whether to be active in a market (\(d=1\)) or not (\(d=0\)). The state has two components:

  • \(x_{t}\) is a market-level demand shifter that follows an AR(1) process: \[ x_{t+1} = \rho x_{t} + \eta_{t+1},\qquad \eta\sim\mathcal{N}(0,\sigma^2_{\eta}) \] which we will discretize on a grid with \(K_{x}\) points to get a transition matrix \(\mathbf{F}_{x}\).
  • \(a_{t}=d_{t-1}\) indicates whether the firm was active in the previous period.

Following our notation from the entry-exit model (but dropping the competitive effect \(\phi_{2}\), since there are no rivals), the deterministic payoffs are:

\[ u_{1}(x,a) = \phi_{0} + \phi_{1}x - \phi_{3}(1-a) \] \[ u_{0}(x,a) = \phi_{4}a \]

so that \(\phi_{3}\) is an entry cost and \(\phi_{4}\) is a scrap value received upon exit. We normalize the scale of the payoff shocks to \(\sigma=1\), so that payoffs are measured in units of the standard deviation of the shocks (times \(\sqrt{6}/\pi\)).

Notice that the transitions take a simple form here. The demand shifter evolves exogenously and the firm’s choice determines next period’s incumbency status: \(a_{t+1}=d_{t}\). Thus:

\[ f_{j}(x',a'|x,a) = \mathbf{F}_{x}[x,x']\times\mathbf{1}\{a'=j\}.\]

Example 17.1 First, we need a routine to discretize the AR(1) process. This is a version of Tauchen’s method, which we used for the savings model. Notice that this time we are writing the transition matrix so that each row sums to one, which is consistent with our notation above.

using Distributions, LinearAlgebra, Random

const γₑ = Base.MathConstants.eulergamma #<- Euler's constant

# Discretize x′ = ρx + η, η ~ N(0,σ²) on K points.
# Returns the grid and a row-stochastic matrix with F[i,i′] = P(x′ = grid[i′] | x = grid[i])
function tauchen(ρ,σ,K; m = 1.5)
    sd = σ / sqrt(1-ρ^2)
    grid = collect(range(-m*sd,m*sd,length=K))
    Δ = grid[2] - grid[1]
    F = zeros(K,K)
    for i in 1:K, i′ in 1:K
        μ = ρ*grid[i]
        lo = i′==1 ? -Inf : (grid[i′] - Δ/2 - μ)/σ
        hi = i′==K ? Inf : (grid[i′] + Δ/2 - μ)/σ
        F[i,i′] = cdf(Normal(),hi) - cdf(Normal(),lo)
    end
    return grid,F
end

Kx = 5
xgrid,Fx = tauchen(0.8,0.5,Kx)
round.(Fx,digits=3)
5×5 Matrix{Float64}:
 0.55   0.366  0.08   0.004  0.0
 0.191  0.455  0.302  0.05   0.002
 0.03   0.236  0.468  0.236  0.03
 0.002  0.05   0.302  0.455  0.191
 0.0    0.004  0.08   0.366  0.55

Next we need to decide how to store the state space. We’ll stack the states \((x,a)\) into a single index \(s = aK_{x} + i_{x}\) where \(i_{x}\) is the location of \(x\) on the grid. The functions below construct the vectors of payoffs and the transition matrices \(\mathbf{F}_{0}\) and \(\mathbf{F}_{1}\).

state_index(ix,a,Kx) = a*Kx + ix

# flow payoffs for each choice, stacked over the state space
function flow_payoffs(ϕ,xgrid)
    (;ϕ0,ϕ1,ϕ3,ϕ4) = ϕ
    u0 = [ϕ4*a for ix in eachindex(xgrid), a in 0:1][:]
    u1 = [ϕ0 + ϕ1*x - ϕ3*(1-a) for x in xgrid, a in 0:1][:]
    return u0,u1
end

# transition matrices over the state (x,a) conditional on each choice
function transition_matrices(Fx)
    Kx = size(Fx,1)
    F0 = zeros(2Kx,2Kx)
    F1 = zeros(2Kx,2Kx)
    for a in 0:1, ix in 1:Kx, ix′ in 1:Kx
        s = state_index(ix,a,Kx)
        F0[s,state_index(ix′,0,Kx)] = Fx[ix,ix′] #<- choosing d=0 means a′=0
        F1[s,state_index(ix′,1,Kx)] = Fx[ix,ix′] #<- choosing d=1 means a′=1
    end
    return F0,F1
end
transition_matrices (generic function with 1 method)

Now we can write the Bellman operator \(\Gamma\), along with the two solution methods. Notice the small trick of subtracting the maximum of \(v_{0}\) and \(v_{1}\) before exponentiating. This avoids numerical overflow when values become large.

# The Bellman operator: returns Γ(V) and the implied choice probabilities
function bellman(V,u0,u1,F0,F1,β)
    v0 = u0 .+ β * F0 * V
    v1 = u1 .+ β * F1 * V
    vmax = max.(v0,v1) #<- subtract the max before exponentiating for numerical stability
    TV = γₑ .+ vmax .+ log.(exp.(v0 .- vmax) .+ exp.(v1 .- vmax))
    p1 = 1 ./ (1 .+ exp.(v0 .- v1))
    return TV,p1
end

function solve_vfi(u0,u1,F0,F1,β; tol = 1e-10, max_iter = 5000)
    V = zeros(promote_type(eltype(u0),eltype(u1)),length(u0))
    for iter in 1:max_iter
        TV,_ = bellman(V,u0,u1,F0,F1,β)
        err = maximum(abs.(TV .- V))
        V = TV
        if err<tol
            return V,iter
        end
    end
    return V,max_iter
end

function solve_newton(u0,u1,F0,F1,β; tol = 1e-10, max_iter = 100)
    V = zeros(promote_type(eltype(u0),eltype(u1)),length(u0))
    for iter in 1:max_iter
        TV,p1 = bellman(V,u0,u1,F0,F1,β)
        FP = (1 .- p1) .* F0 .+ p1 .* F1 #<- transition matrix implied by p1
        Vnew = V .- (I - β*FP) \ (V .- TV)
        err = maximum(abs.(Vnew .- V))
        V = Vnew
        if err<tol
            return V,iter
        end
    end
    return V,max_iter
end
solve_newton (generic function with 1 method)

Let’s set some parameters and compare the two methods. For now we set the scrap value \(\phi_{4}\) to zero. We’ll see why later.

β = 0.95
ϕ = (;ϕ0 = -0.5, ϕ1 = 1., ϕ3 = 2., ϕ4 = 0.)
u0,u1 = flow_payoffs(ϕ,xgrid)
F0,F1 = transition_matrices(Fx)

V_vfi,iter_vfi = solve_vfi(u0,u1,F0,F1,β)
V_newton,iter_newton = solve_newton(u0,u1,F0,F1,β)
println("Value function iteration took $iter_vfi iterations")
println("Newton's method took $iter_newton iterations")
println("Maximum difference in solutions: $(maximum(abs.(V_vfi .- V_newton)))")
Value function iteration took 446 iterations
Newton's method took 5 iterations
Maximum difference in solutions: 1.8462387174622563e-9
@time solve_vfi(u0,u1,F0,F1,β);
@time solve_newton(u0,u1,F0,F1,β);
  0.000183 seconds (7.14 k allocations: 501.922 KiB)
  0.000019 seconds (163 allocations: 27.047 KiB)

Both methods arrive at the same answer, but Newton’s method is much faster. Let’s put this all together into a function that returns the probability of being active in each state and take a look at the solution.

# solve the model and return the probability of being active in each state
function solve_ccp(ϕ,xgrid,F0,F1,β)
    u0,u1 = flow_payoffs(ϕ,xgrid)
    V,_ = solve_newton(u0,u1,F0,F1,β)
    _,p1 = bellman(V,u0,u1,F0,F1,β)
    return p1
end

using Plots
p1 = solve_ccp(ϕ,xgrid,F0,F1,β)
plot(xgrid,p1[1:Kx],label="Inactive (a=0)",marker=:circle)
plot!(xgrid,p1[Kx+1:2Kx],label="Active (a=1)",marker=:circle,xlabel="x",ylabel="P(d=1|x,a)")

As expected, the probability of being active is increasing in demand and is higher for incumbent firms, since they do not have to pay the entry cost.

17.1.1 Simulating Data

Suppose we observe a panel of \(M\) independent markets over \(T\) periods: \((X_{mt},A_{mt},D_{mt})_{m=1,t=1}^{M,T}\). Since there are no persistent unobservables, simulating from the model is straightforward once we have the CCPs.

Example 17.2 We’ll assume that all markets begin with no active firm (\(a_{1}=0\)) and that the initial value of \(x\) is drawn from the stationary distribution of the Markov chain.

# stationary distribution of a row-stochastic matrix
function stationary(F)
    π∞ = real(eigvecs(Matrix(F'))[:,end])
    return π∞ ./ sum(π∞)
end

# simulate a panel of M markets over T periods. All markets start inactive (a=0).
function simulate_markets(p1,Fx,M,T; seed = nothing)
    if !isnothing(seed)
        Random.seed!(seed)
    end
    Kx = size(Fx,1)
    π∞ = stationary(Fx)
    X = zeros(Int,T,M)
    A = zeros(Int,T,M)
    D = zeros(Int,T,M)
    for m in 1:M
        ix = rand(Categorical(π∞))
        a = 0
        for t in 1:T
            d = rand() < p1[state_index(ix,a,Kx)]
            X[t,m] = ix
            A[t,m] = a
            D[t,m] = d
            a = d
            ix = rand(Categorical(Fx[ix,:]))
        end
    end
    return (;X,A,D)
end

data = simulate_markets(p1,Fx,1000,10; seed = 1)
println("Fraction of market-periods with an active firm: $(mean(data.D))")
println("Entry rate: $(mean(data.D[data.A.==0]))")
println("Exit rate: $(mean(1 .- data.D[data.A.==1]))")
Fraction of market-periods with an active firm: 0.2779
Entry rate: 0.1581950895819509
Exit rate: 0.35618661257606493

17.2 Estimation by Nested Fixed Point

Let \(\theta\) collect the payoff parameters, and let \(\theta_{f}\) collect the parameters of the transition process \(f\) for the observed states. Given our panel of markets, the likelihood of the data is:

\[ \mathcal{L}(\theta,\theta_{f}) = \prod_{m=1}^{M}\prod_{t=1}^{T}p_{D_{mt}}(X_{mt},A_{mt};\theta,\theta_{f})\times\prod_{m=1}^{M}\prod_{t=1}^{T-1}f(X_{m,t+1}|X_{mt};\theta_{f}). \]

Following the three-step approach from the framework chapter, we first estimate \(\mathbf{F}_{x}\) by frequency, and then maximize the partial likelihood of choices, solving for the fixed point \(\mathbf{V}\) at every guess of \(\theta\).

Example 17.3 Let’s start with the frequency estimator of the transition matrix.

# frequency estimator of the transition matrix for x
function estimate_Fx(data,Kx)
    (;X) = data
    F = zeros(Kx,Kx)
    for m in axes(X,2), t in 1:size(X,1)-1
        F[X[t,m],X[t+1,m]] += 1
    end
    return F ./ sum(F,dims=2)
end

F̂x = estimate_Fx(data,Kx)
F̂0,F̂1 = transition_matrices(F̂x)
maximum(abs.(F̂x .- Fx))
0.019449967051805905

Next, the log-likelihood of choices. We impose the normalization \(\phi_{4}=0\) and estimate \(\theta = (\phi_{0},\phi_{1},\phi_{3})\) with \(\beta\) fixed at its true value.

# log-likelihood of choices given a vector of CCPs
function choice_loglikelihood(p1,data,Kx)
    (;X,A,D) = data
    ll = zero(eltype(p1))
    for i in eachindex(D)
        s = state_index(X[i],A[i],Kx)
        ll += D[i]==1 ? log(p1[s]) : log(1-p1[s])
    end
    return ll
end

# partial log-likelihood with the normalization ϕ4 = 0 and θ = (ϕ0,ϕ1,ϕ3)
function log_likelihood(θ,data,xgrid,F0,F1,β)
    ϕ = (;ϕ0 = θ[1], ϕ1 = θ[2], ϕ3 = θ[3], ϕ4 = 0.)
    p1 = solve_ccp(ϕ,xgrid,F0,F1,β)
    return choice_loglikelihood(p1,data,length(xgrid))
end
log_likelihood (generic function with 1 method)

Since our solution method is just a finite sequence of differentiable operations, we can use automatic differentiation to get exact gradients and Hessians of the log-likelihood, through the model solution. This lets us use Newton’s method in the outer loop as well.

using Optim, ForwardDiff
obj(θ) = -log_likelihood(θ,data,xgrid,F̂0,F̂1,β)
res = optimize(obj,zeros(3),Newton(),autodiff=:forward)
θ̂ = res.minimizer
3-element Vector{Float64}:
 -0.5127671934427994
  1.0266652357365202
  1.9455539345472004

Let’s calculate standard errors using the Hessian (Theorem 13.5) and compare to the truth.

H = ForwardDiff.hessian(obj,θ̂)
se = sqrt.(diag(inv(H)))
θ_true = [ϕ.ϕ0,ϕ.ϕ1,ϕ.ϕ3]
for (i,name) in enumerate(["ϕ0","ϕ1","ϕ3"])
    println("$name: estimate = $(round(θ̂[i],digits=3)), se = $(round(se[i],digits=3)), truth = $(θ_true[i])")
end
ϕ0: estimate = -0.513, se = 0.026, truth = -0.5
ϕ1: estimate = 1.027, se = 0.036, truth = 1.0
ϕ3: estimate = 1.946, se = 0.057, truth = 2.0

Looks good! Note that these standard errors ignore the fact that \(\mathbf{F}_{x}\) was estimated in a first step. We could correct them using the theory of two-step estimators or the bootstrap, or by implementing Rust’s third step.

@time optimize(obj,zeros(3),Newton(),autodiff=:forward);
  0.002037 seconds (3.91 k allocations: 2.674 MiB)

Estimation is fast here because the state space is tiny. In applications with millions of states, each solution of the inner loop can be expensive, and the outer loop may require hundreds of evaluations.

17.3 Identification and Normalization

Recall from Theorem 16.1 that the payoffs of one choice must be known for flow payoffs to be identified, and that the normalization of these payoffs is a substantive assumption in a dynamic model. In the entry model, this problem shows up in a very concrete way.

Example 17.4 In our entry model, take \(c(x,a) = -\phi_{4}a\). Since choosing \(d=j\) means that \(a'=j\), the new payoffs are:

\[ \tilde{u}_{0}(x,a) = \phi_{4}a - \phi_{4}a + 0 = 0 \] \[ \tilde{u}_{1}(x,a) = \phi_{0} + \phi_{1}x - \phi_{3}(1-a) - \phi_{4}a + \beta\phi_{4} = \underbrace{\phi_{0} - (1-\beta)\phi_{4}}_{\tilde{\phi}_{0}} + \phi_{1}x - \underbrace{(\phi_{3}-\phi_{4})}_{\tilde{\phi}_{3}}(1-a). \]

Hence the model with parameters \((\phi_{0},\phi_{1},\phi_{3},\phi_{4})\) is observationally equivalent to the model with parameters \((\phi_{0}-(1-\beta)\phi_{4},\phi_{1},\phi_{3}-\phi_{4},0)\). The entry cost and the scrap value are not separately identified (Aguirregabiria and Suzuki 2014). Let’s verify this numerically:

ϕA = (;ϕ0 = -0.5, ϕ1 = 1., ϕ3 = 2., ϕ4 = 0.5)
ϕB = (;ϕ0 = ϕA.ϕ0 - (1-β)*ϕA.ϕ4, ϕ1 = ϕA.ϕ1, ϕ3 = ϕA.ϕ3 - ϕA.ϕ4, ϕ4 = 0.)
pA = solve_ccp(ϕA,xgrid,F0,F1,β)
pB = solve_ccp(ϕB,xgrid,F0,F1,β)
maximum(abs.(pA .- pB))
9.992007221626409e-16

Identical up to machine precision. This is why we imposed \(\phi_{4}=0\) in estimation: the parameter \(\phi_{3}\) should be interpreted as the entry cost net of the scrap value. The same argument applies to the duopoly version of the model.

Discussion: Do Normalizations Matter for Counterfactuals?

Suppose we estimate the entry model under the normalization \(\phi_{4}=0\), and the true scrap value is \(\phi_{4}=0.5\).

  1. Consider a counterfactual policy that subsidizes entry by a fixed amount \(\tau\) (so the entry cost falls from \(\phi_{3}\) to \(\phi_{3}-\tau\)). Will the normalized model correctly predict the effect of this policy on entry rates?
  2. Now consider a policy that reduces entry costs by 20%. Will the normalized model correctly predict the effect of this policy?
  3. What about a policy that taxes incumbents by a fixed amount in every period that they are active?

Aguirregabiria and Suzuki (2014) and Kalouptsidi, Scott, and Souza-Rodrigues (2021) characterize which counterfactuals are identified despite the underidentification of payoffs. Roughly, counterfactuals that shift payoffs by known amounts tend to be identified, while those that scale unidentified objects are not.

17.4 Counterfactuals

Why go to the trouble of estimating a dynamic model? The reason is that we want to answer questions that the data alone cannot. Consider a policy that subsidizes entry into the market by an amount \(\tau\), so that the entry cost falls from \(\phi_{3}\) to \(\phi_{3}-\tau\). Notice that, by the discussion above, this counterfactual is unaffected by our normalization of the scrap value: the subsidy shifts payoffs by a known amount.

To summarize the effects of the policy, we’ll calculate the long-run behavior of the market. Given choice probabilities \(\mathbf{p}\), the state \((x,a)\) evolves as a Markov chain with transition matrix \(\mathbf{F}^{\mathbf{p}}=\sum_{j}\text{diag}(\mathbf{p}_{j})\mathbf{F}_{j}\), the same matrix we used in Newton’s method. The stationary distribution of this chain tells us the long-run fraction of time that the market is served, as well as the rates of entry and exit.

Example 17.5  

# long-run behavior implied by a vector of CCPs
function steady_state(p1,F0,F1)
    FP = (1 .- p1) .* F0 .+ p1 .* F1 #<- transition matrix over (x,a) induced by p1
    π∞ = stationary(FP)
    Kx = length(p1) ÷ 2
    active = sum(π∞ .* p1)
    entry = sum(π∞[1:Kx] .* p1[1:Kx]) / sum(π∞[1:Kx])
    exit = sum(π∞[Kx+1:end] .* (1 .- p1[Kx+1:end])) / sum(π∞[Kx+1:end])
    return (;active,entry,exit)
end

function entry_subsidy(θ,τ,xgrid,F0,F1,β)
    ϕ = (;ϕ0 = θ[1], ϕ1 = θ[2], ϕ3 = θ[3] - τ, ϕ4 = 0.)
    return steady_state(solve_ccp(ϕ,xgrid,F0,F1,β),F0,F1)
end

τgrid = 0:0.1:1.5
cf = [entry_subsidy(θ̂,τ,xgrid,F̂0,F̂1,β) for τ in τgrid]
16-element Vector{@NamedTuple{active::Float64, entry::Float64, exit::Float64}}:
 (active = 0.29936324152823346, entry = 0.15295247085340397, exit = 0.35797355357294075)
 (active = 0.3048037143635445, entry = 0.1605998875547089, exit = 0.36629620979126604)
 (active = 0.3101923781025854, entry = 0.1685655366376675, exit = 0.37485702477008)
 (active = 0.3155285031621152, entry = 0.17685586853767907, exit = 0.3836509217056489)
 (active = 0.3208111679863628, entry = 0.18547640689525857, exit = 0.3926718167449576)
 (active = 0.3260392504567123, entry = 0.19443162805262645, exit = 0.4019126089687403)
 (active = 0.33121142306377865, entry = 0.20372484189420922, exit = 0.41136518129916233)
 (active = 0.3363261519006724, entry = 0.21335807604299478, exit = 0.42102041292448233)
 (active = 0.3413816995340239, entry = 0.22333196558956966, exit = 0.43086820358883493)
 (active = 0.34637613179090393, entry = 0.23364565065336287, exit = 0.44089750982747306)
 (active = 0.3513073284656236, entry = 0.24429668414661096, exit = 0.4510963929451925)
 (active = 0.3561729979009881, entry = 0.2552809521216757, exit = 0.4614520782486971)
 (active = 0.36097069533549964, entry = 0.26659260902382337, exit = 0.47195102476351836)
 (active = 0.36569784483332246, entry = 0.27822403003840296, exit = 0.4825790044044491)
 (active = 0.3703517645303621, entry = 0.2901657825098497, exit = 0.49332118933651053)
 (active = 0.37492969484146804, entry = 0.3024066181197835, exit = 0.5041622460712761)

Now here is an instructive comparison. Suppose that a researcher instead assumed that the firm was myopic (\(\beta=0\)) and estimated the same three parameters. How well does this model fit the data?

obj_myopic(θ) = -log_likelihood(θ,data,xgrid,F̂0,F̂1,0.)
θ̂_myopic = optimize(obj_myopic,zeros(3),Newton(),autodiff=:forward).minimizer
println("Log-likelihood, forward-looking (β = $β): $(round(-obj(θ̂),digits=2))")
println("Log-likelihood, myopic (β = 0): $(round(-obj_myopic(θ̂_myopic),digits=2))")
println("Myopic estimates: $(round.(θ̂_myopic,digits=3))")
Log-likelihood, forward-looking (β = 0.95): -4262.46
Log-likelihood, myopic (β = 0): -4262.39
Myopic estimates: [0.105, 1.402, 1.943]

The two models fit the data equally well! This is Theorem 16.1 in action: without an exclusion restriction, the data cannot distinguish a patient firm from an impatient one with different payoffs. But do they make the same predictions about the subsidy?

cf_myopic = [entry_subsidy(θ̂_myopic,τ,xgrid,F̂0,F̂1,0.) for τ in τgrid]
pl1 = plot(τgrid,[c.active for c in cf],label="Forward-looking",title="Fraction of periods active")
plot!(pl1,τgrid,[c.active for c in cf_myopic],label="Myopic",xlabel="Subsidy (τ)")
pl2 = plot(τgrid,[c.exit for c in cf],label="Forward-looking",title="Exit rate")
plot!(pl2,τgrid,[c.exit for c in cf_myopic],label="Myopic",xlabel="Subsidy (τ)")
plot(pl1,pl2,size=(800,350))

They do not. The myopic model predicts that the subsidy increases the fraction of time the market is served much more than the forward-looking model does. The reason is that a forward-looking firm understands that the entry cost buys an option to remain in the market without paying it again. Since the subsidy makes entry cheaper, it also makes this option less valuable: subsidized firms enter more readily but they are also much more willing to exit when demand falls, knowing that re-entry is cheap. The myopic model misses this response of the exit rate entirely, since its estimated entry cost only matters at the moment of entry.

The lesson is that two models that fit the data equally well can deliver very different counterfactual predictions, and the difference comes down to an assumption (\(\beta\)) that the data cannot speak to here.

Discussion: Fit Versus Counterfactuals

In the example above, the myopic and forward-looking models are (essentially) observationally equivalent, but they disagree about the effects of the subsidy.

  1. If you had to choose between these two models, what evidence would you look for? Could you design an experiment or find a natural experiment that would distinguish them?
  2. Suppose you had data from a period in which an entry subsidy was in place. How would you use it? Should it be used in estimation, or held out to validate the model?
  3. Are there counterfactuals on which the two models would agree?

17.5 Further Reading

Rust (1987) is the classic single-agent application of these methods, to the replacement of bus engines. Aguirregabiria and Suzuki (2014) and Kalouptsidi, Scott, and Souza-Rodrigues (2021) discuss in detail the identification of counterfactuals in models of market entry and exit. The CCP chapter returns to the strategic version of this model.

17.6 Exercises

Exercise

Exercise 17.1 Consider a finite-horizon version of the single-agent entry model in which each market lasts for \(T=10\) periods and the continuation value after period \(T\) is zero.

  1. Write code to solve this version of the model by backward induction. Your solution should return a \(2K_{x}\times T\) array of choice probabilities.
  2. Simulate a panel of \(M=1,000\) markets using the parameters from Example 17.1.
  3. Estimate \((\phi_{0},\phi_{1},\phi_{3})\) by NFXP, taking \(\beta\) as known. Then estimate \((\phi_{0},\phi_{1},\phi_{3},\beta)\) jointly.
  4. Repeat part 3 for the infinite-horizon model using the data from Example 17.2. Compare the precision of \(\hat{\beta}\) in the two cases. Relate your answer to the discussion of exclusion restrictions in the framework chapter and to Example 17.5.
Exercise

Exercise 17.2 The standard errors in Example 17.3 ignore the fact that \(\mathbf{F}_{x}\) was estimated in a first step.

  1. Implement Rust’s third step: write the full log-likelihood (choices and transitions) as a function of \(\theta\) and the free parameters of \(\mathbf{F}_{x}\), and calculate standard errors for \(\hat{\theta}\) using the full information matrix. Hint: you can parameterize each row of \(\mathbf{F}_{x}\) using a multinomial logit to keep the probabilities in the simplex.
  2. Calculate standard errors using a bootstrap that resamples markets and re-estimates both \(\mathbf{F}_{x}\) and \(\theta\) in each bootstrap sample.
  3. Compare these standard errors to those in Example 17.3. Does first-stage estimation error matter much in this example?