Normalization and Linear Model NaN error?

Good Day Julians:

I am attempting to pass an interpolated (imputed)
and normalized DF into a GLM.jl function (lm(@formula …).

Under what circumstances would the Stats.Models TableRegression…
return NaN such as:

Any suggestions?

Thank you,

using LinearAlgebra
b = normalize(a)

There is not much to go with. Maybe you have already looked into it. But I would check that the design matrix is according to your expectations. You could do that with for instance:

using GLM, StatsModels, DataFrames
f = @formula( y ~ 1 + x2 + x3 ^2 ) # using your formula
f = apply_schema(f, schema(df)) # using your data
y, X = modelcols(f, df)
ydes = describe(y)
Xdes = describe(DataFrame(X, :auto))

maybe the problem will reveal itself then.
If you are using categorical data, it may be worth looking into the numbers of observations per category, the package FreqTables (https://github.com/nalimilan/FreqTables.jl) is handy for that purpose.

Hello Eric:

Thank you very much for this QA tips.

I believe part of the issue was also that
I scaled/normalized the entire data
frame values (all float64 eltypes), and
some of the values were too small to
render within the regression module.

Will test your instructions here and
feed in if I encounter issues.

Thanks.