Skip to content

Commit 8060e86

Browse files
Show F-statistic for regression models
1 parent 950ba92 commit 8060e86

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/statsmodel.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ function Base.show(io::IO, model::TableModels)
193193
if model isa TableRegressionModel
194194
println(io)
195195
println("R²: ", round(r2(model), sigdigits=4))
196+
try
197+
fstat = fstatistic(model)
198+
println(io, fstat)
199+
catch e
200+
if !(isa(e, MethodError) && e.f == fstatistic)
201+
rethrow(e)
202+
end
203+
end
196204
end
197205
catch e
198206
if isa(e, ErrorException) && occursin("coeftable is not defined", e.msg)
@@ -202,3 +210,5 @@ function Base.show(io::IO, model::TableModels)
202210
end
203211
end
204212
end
213+
214+
fstatistic(m::TableRegressionModel) = fstatistic(m.model)

0 commit comments

Comments
 (0)