JuliaStats / GLM.jl

Generalized linear models in Julia
Other
593 stars 114 forks source link

infinite uninterruptible hang on one illegal input to ftest #538

Closed xgdgsc closed 1 year ago

xgdgsc commented 1 year ago

ftesthang.csv

using CSV
using GLM
using DataFrames
regData = CSV.read("ftesthang.csv", DataFrame)
ols = lm(@formula(Y ~ X1 + X2 + X3 + X4 + X5 + X6 + 1), regData)
oCoefs = coef(ols)
ftestRes = ftest(ols.model)

With this illegal input. ftest hangs in an infinite uninterruptible way. Is it possible to throw an error instead?

ararslan commented 1 year ago

Looks like the continued fraction implementation of the incomplete beta function in SpecialFunctions gets stuck in an infinite loop because there's no check that the input is finite.

andreasnoack commented 1 year ago

Okay! That's a pretty degenerate case. This is now fixed upstream.