Skip to content

Commit

Permalink
Update output writing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcorcuera committed Dec 28, 2023
1 parent dd323b5 commit b161703
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/VarianceComponentsHDFE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ function real_main()
Bii_first = Bii_first == nothing ? nothing : vcat(fill.(Bii_first, weights)...)
Bii_second = Bii_second == nothing ? nothing : vcat(fill.(Bii_second, weights)...)
Bii_cov = Bii_cov == nothing ? nothing : vcat(fill.(Bii_cov, weights)...)
Dalpha = vcat(fill.(Dalpha, weight)...)
Fpsi = vcat(fill.(Fpsi, weight)...)
end

#Make sure that we can put them in a DataFrame
Expand Down
13 changes: 3 additions & 10 deletions src/leave_out_correction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -721,25 +721,18 @@ function leave_out_estimation(y,first_id,second_id,controls,settings)
sigma_i[stayers] .= [sigma_stayers[j] for j in findall(x->x==true,stayers )]
end

pe=D * beta[1:N]
fe=F*S * beta[N+1:N+J-1]

#Compute bias corrected variance comp of second (Firm) Effects
σ_second , θ_second = kss_quadratic_form(sigma_i, Fvar, Fvar, beta, Bii_second)

σ_first,θ_first = settings.first_id_effects==true ? kss_quadratic_form(sigma_i, Dvar, Dvar, beta, Bii_first) : nothing

σ_cov ,θCOV = settings.cov_effects==true ? kss_quadratic_form(sigma_i, Fvar, Dvar, beta, Bii_cov) : nothing

#Pii = diag(Pii)

#Bii_second = diag(Bii_second)

#Bii_first = settings.first_id_effects == true ? diag(Bii_first) : nothing

#Bii_cov = settings.cov_effects == true ? diag(Bii_cov) : nothing
pe=D * beta[1:N]
fe=F*S * beta[N+1:N+J-1]

#TODO print estimates


if settings.print_level > 0
println("\n","Plug-in Variance Components:")
Expand Down

0 comments on commit b161703

Please sign in to comment.