Skip to content

Failed to "solve" logistic regression that R can  #449

Closed
@xiaodaigh

Description

plsdel.zip

Unzip the above and then do this

using CSV, DataFrames
df = CSV.read("plsdel.csv", DataFrame)

x_terms = sum(Term(Symbol("x$i")) for i in 1:569)

formula = Term(:y)~ConstantTerm(-1) + x_terms

using GLM
m = glm(formula, df, Binomial())

this fails with this error

ERROR: PosDefException: matrix is not positive definite; Cholesky factorization failed.

However, R's glm can handle it e.g.

using RCall
@rput df
R"""
glm(y~-1+., data = df, family=binomial)
"""

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions