Robust logistic regression on R studio?

Hi there, a brand new user to R studio.

I'm looking to perform robust logistic regression on R studio as my predictor variables are skewed (to be honest I'm not even sure if robust logistic regression exists).

I've looked at packages such as "robust" but they do not seem to have anything catered to logistic regression.

Thank you in advance!

i think it would be robust::glmrob with family = binomial

1 Like

Thank you! It worked. However, I received an error message when I tried inputting a variable that had 3 groups. Is there any way to solve this? Or would the variable have to consist of 2 groups?

Error code:

Error in solve.default(Zmcd$cov) :

Lapack routine dgesv: system is exactly singular: U[5,5] = 0
In addition: Warning message:
In covMcd(data, cor = FALSE, control = control) :
The 1001-th order statistic of the absolute deviation of variable 5 is zero.
There are 1077 observations (in the entire dataset of 1177 obs.) lying on the hyperplane with equation a_1*(x_i1 -
m_1) + ... + a_p*(x_ip - m_p) = 0 with (m_1, ..., m_p) the mean of these observations and coefficients a_i from the
vector a <- c(0, 0, 0, 0, 1)

I cant imagine that theres any such restriction on dependent variables.

Perhaps you could provide a reprex.

1 Like

Happens when the matrix lacks an inverse, possibly because the algorithm had to try division by zero. Check for collinearity among groups.

1 Like

Just checked with my professors and they mentioned that the data might not have enough variance which is why the error pops up. Decided to just run a normal logistic regression (which works) instead of a robust one. Thanks for helping and also @nirgrahamuk!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.