Problems creating odds ratios for a binary regression in R I am creating a binary logistic regression in R studio. So far I have performed the regression and I am trying to convert it to odds ratios using the function:
  install.packages(c("glm"))
regression<-glm(wellbeing.dummy ~ age[, "25-44"] + age[, "45-54"] + age[, "55-64"] +
                  age[, "65-74"] + age[,"75+"] + marstat[, "Single"] + 
                  marstat[, "Widowed"] + sex[, "Female"] + socioeco[, "Intermediate"] + socioeco[, "Manual"] +
                 socioeco[, "Other"] + workhrs[, "Part-Time"] + ons.data$MCZ_8
                  , family=binomial(link="logit"),
                weights=ons.data$INDWGTr, na.action=na.omit)
summary(regression)

####Producing odds ratios for the logistic regression####

install.packages(c("car"))
library('car')
vif(regression)
OR <- exp(coef(regression))
odds<-exp(cbind(OR=coef(regression), confint(regression)))
round(odds, 3)

It is when I get to the lines where I am trying to make the odds function (odds<-...) that I receive the error:
Waiting for profiling to be done...
Error in profile.glm(object, which = parm, alpha = (1 - level)/4, trace = trace) : 
  profiling has found a better solution, so original fit had not converged
In addition: Warning messages:
1: In eval(family$initialize) : non-integer #successes in a binomial glm!
2: glm.fit: fitted probabilities numerically 0 or 1 occurred 

This is stopping the object 'odds' from being made, so the final line of code turns the error 'object 'odds' not found'.
Can anyone provide some help on how I can get around this, or an alternative way of making odds ratios for my regression? I'm very new to R so apologies if this is really obvious or if I'm just a bit slow.

I'll first explain the warnings.

*

*In eval(family$initialize) : non-integer #successes in a binomial glm!
This occurs when you have non-integer sampling weights supplied to the weights argument. The warning is unimportant, but to prevent it from displaying you can use family = quasibinomial() instead. More on this below.


*glm.fit: fitted probabilities numerically 0 or 1 occurred
This means the model perfectly predicted some cases, which implies the model failed to converge to stable maximum likelihood estimates. You have perfect separation.

The error comes from confint(), which calls profile() on the regression object. Because the model failed to converge, profile() produces this error. You simply cannot fit the model as-is and you need to adjust it. There are many posts on this site dealing with perfect separation in logistic regression.

An additional complication is your survey weights. You cannot use the standard errors and confidence intervals produced by glm(). Instead, your uncertainty estimation needs to take into account the survey weights. The svyglm() function in the survey package does this correctly. It will still not help the model converge in the face of perfect separation; for that, you need other adjustments.
This is a fairly advanced statistical problem: perfect separation in a logistic regression with survey weights. I advise you consult with an applied statistician familiar with these topics to ensure your analysis is valid.
