ngreifer / cobalt

Covariate Balance Tables and Plots - An R package for assessing covariate balance
https://ngreifer.github.io/cobalt/
72 stars 11 forks source link

On which statistical test are the p-values of the bal.tab function in the COBALT package in r based? #62

Closed MoniqueStenzel closed 2 years ago

MoniqueStenzel commented 2 years ago

I performed propensity score matching using the nearest neighbor method with the MatchIt-package. To assess the balance by matching I used the bal.tab function of the COBALT package setting the thresholds for mean differences to ".05".

library(MatchIt) m.outtest <- matchit(icu_mort ~ age + sex + duration_h, data = testdata1, method = "nearest", distance = "glm", replace = FALSE, ratio = 1, caliper = .2, std.caliper = FALSE) bal.tab(m.outtest, continuous = "std", binary = "raw", disp = c("means"), un = TRUE, stats = c("m"), thresholds = c(m = .05))

image

I received a result about balance measure, but I did not find any information on which statistical tests the p-values are based on, which result in "balanced" or "not balanced".

Usually a p-value >0.05 means that there are no significant differences between the groups, but this is what is called "not balanced" here, that means there are differences between treatment group and control group after matching.

How to explain the (apparent) inconsistency regarding the meaning of the p-values? On which statsitical tests are the p-values based?

ngreifer commented 2 years ago

There are no p-values in cobalt, see the main vignette. The M.Threshold column indicates whether each mean difference is above or below the specified threshold. For age, the standardized mean difference is -.0307, which is less than .05 in absolute value, so the variable is balanced by that metric. For duration_h, the standardized mean difference is .1056, which is greater than .05 in absolute value, so the variable is not balanced by that metric. This is described in the documentation for bal.tab().

MoniqueStenzel commented 2 years ago

Thanks for clarifying my misunderstanding!