1

I have returned to a piece of work and was re-running some statistical analysis. I found differences in the P values (which is > 0.05) and OR confidence intervals which was greater than 1. Is there an error?

logr1 <- glm(fibrous.high ~ age + sex + prs_cat.f, data=df[which(df$age_tert == 1),], family = "binomial")

summary(logr1)

Call: glm(formula = fibrous.high ~ age + sex + prs_cat.f, family = "binomial", data = df[which(df$age_tert == 1), ])

Deviance Residuals: Min 1Q Median 3Q Max
-1.3974 -0.8909 -0.5475 1.1486 1.9787

Coefficients: Estimate Std. Error z value Pr(>|z|)
(Intercept) -10.55024 3.73270 -2.826 0.00471 ** age 0.17186 0.07029 2.445 0.01449 * sex -0.70726 0.70454 -1.004 0.31545
prs_cat.f31-75% 1.16642 0.86764 1.344 0.17883
prs_cat.f≥76% 1.60185 0.88271 1.815 0.06957 .


Signif. codes: 0 ‘*’ 0.001 ‘’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 100.12  on 80  degrees of freedom

Residual deviance: 89.25 on 76 degrees of freedom AIC: 99.25

Number of Fisher Scoring iterations: 4

Confidence intervals:

# exp(cbind(OR = coef(logr1), confint(logr1)))
                          OR        2.5 %      97.5 %
(Intercept)     2.618725e-05 8.536605e-09  0.02264591
age             1.187506e+00 1.044550e+00  1.38011363
sex             4.929952e-01 1.104873e-01  1.84047050
prs_cat.f31-75% 3.210487e+00 6.775618e-01 23.66097294
prs_cat.f≥76%   4.962205e+00 1.022622e+00 37.53934890

Is there a reason why for the prs_cat.f≥76%, the P value is 0.07, but the odds ratio does not cross 1?

Urb
  • 175
  • 5
Pras_V
  • 11

1 Answers1

1

There is no error. Rather there is a difference between a profile confidence interval and a Wald confidence interval for the log odds ratio.

Consider the log odds ratio for prs_cat.f≥76%. The 95% profile confidence interval doesn't contain 0.

# 95% profile confidence interval
log(c(1.022622e+00, 37.53934890))
#> [1] 0.02236992 3.62538969

However, the 95% Wald confidence interval contains 0.

# 95% Wald confidence interval
estimate <- 1.60185
std.error <- 0.88271
# 95% Wald confidence interval
estimate + c(-1.96, +1.96) * std.error
#> [1] -0.1282616  3.3319616

To learn more take a look at Why is there a difference between manually calculating a logistic regression 95% confidence interval, and using the confint() function in R?

dipetkov
  • 9,805