binomial logistic regression

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
cihonan1994
Posts: 1
Joined: Tue Jun 24, 2025 9:22 am

binomial logistic regression

Post by cihonan1994 »

Hi everyone,

The "binomial logistic regression" that I have been using for a long time started giving errors today.

"Debug

Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]): contrasts can be applied only to factors with 2 or more levels

private$.run()
private$.populateModelFitTable()
(function ()
{
if (is.null(private$.pseudoR2))
private$.pseudoR2 <- private$.computePseudoR2()
return(private$.pseudoR2)
})()
private$.computePseudoR2()
(function ()
{
if (is.null(private$.models))
private$.models <- private$.computeModels()
return(private$.models)
})()
private$.computeModels()
stats::glm(formulas[], data = data, family = "binomial", weights = self$weights)
model.matrix(mt, mf, contrasts)
model.matrix.default(mt, mf, contrasts)
`contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]])
stop("contrasts can be applied only to factors with 2 or more levels")

Is there a solution?

Thank you
User avatar
jonathon
Posts: 2852
Joined: Fri Jan 27, 2017 10:04 am

Re: binomial logistic regression

Post by jonathon »

hi,

if you can provide steps (and data) to reproduce this, i can have a team member take a look.

errors like this usually indicate a problem with your data, but we should provide a more informative error message.

jonathon
Post Reply