Skip to content

Commit 0231e61

Browse files
Update fit.jl (#218)
* Update fit.jl * Update Project.toml * Update fit.jl * Update fit.jl * Update Project.toml
1 parent 06d9b61 commit 0231e61

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FixedEffectModels"
22
uuid = "9d5cd8c9-2029-5cab-9928-427838db53e3"
3-
version = "1.7.1"
3+
version = "1.8.0"
44

55
[deps]
66
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
@@ -25,5 +25,5 @@ StatsBase = "0.33"
2525
StatsFuns = "0.9, 1"
2626
StatsModels = "0.6"
2727
Tables = "1"
28-
Vcov = "0.6"
28+
Vcov = "0.7"
2929
julia = "1.3"

src/fit.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Estimate a linear model with high dimensional categorical variables / instrument
1616
* `tol::Real` Tolerance. Default to 1e-6.
1717
* `maxiter::Integer = 10000`: Maximum number of iterations
1818
* `drop_singletons::Bool = true`: Should singletons be dropped?
19-
* `progress_bar::Bool = true`: Should the regression show a progressbar
19+
* `progress_bar::Bool = true`: Should the regression show a progressbar?
2020
* `first_stage::Bool = true`: Should the first-stage F-stat and p-value be computed?
2121
* `dof_add::Integer = 0`:
22-
* `subset::Union{Nothing, AbstractVector} = nothing`: select specific rows
22+
* `subset::Union{Nothing, AbstractVector} = nothing`: select specific rows.
2323
2424
2525
### Details
@@ -415,7 +415,7 @@ function StatsAPI.fit(::Type{FixedEffectModel},
415415

416416
# Compute Fstat
417417
F = Fstat(coef, matrix_vcov, has_intercept)
418-
dof_tstat_ = max(1, Vcov.dof_tstat(vcov_data, vcov_method, has_intercept | has_fe_intercept))
418+
dof_tstat_ = max(1, Vcov.dof_residual(vcov_data, vcov_method) - has_intercept | has_fe_intercept)
419419
p = fdistccdf(dof_, dof_tstat_, F)
420420
# Compute Fstat of First Stage
421421
if has_iv && first_stage

0 commit comments

Comments
 (0)