Closed giacfalk closed 3 years ago
This is not a bug and is explained at help("col_w_cov")
. A correlation is a covariance divided by a standardization factor. When the covariance and standardization factor are computed in the same sample, the correlation is bounded between -1 and 1. But cobalt
computes the covariance in the weighted sample and the standardization factor in the unweighted sample, so correlations are no longer bounded. What happened here is that the standardization factor is much smaller in the unweighted sample than it would be if it were computed in the weighted sample. This is because you have degenerate weighting solution.
I agree that this can seem weird, but it is exactly the same philosophy as used in computed standardized mean differences for binary treatments; the unweighted standardization factor is used there as well. To use the standardization factor computed in the weighted sample, you can set s.d.denom = "weighted"
, in which case the correlations should be correctly bounded.
After creating weights with weightitMSM, bal.tab yields values of Max.Corr.Adj that are > 1, which does not make any sense.
What could be the cause? (just reporting a subset of covariates in the table)
Many thanks!