0
$\begingroup$

What is the distance parameter that is plotted on the love.plot ? I am not able to find any reference or explanation for this in the cobalt package. Any help understanding this value "distance" will be helpful. Thanks.

library(MatchThem)

data("osteoarthritis")

library(mice)
imputed.datasets <- mice(osteoarthritis, m = 5)

table(imputed.datasets$data$OSP)

table(imputed.datasets$data$KOA)

matched.datasets <- matchthem(OSP ~ AGE + SEX + BMI + RAC + SMK,
                              datasets = imputed.datasets,
                              approach = 'within',
                              method = 'nearest',
                              caliper = 0.05,
                              ratio = 2)

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

You'll see the following in the documentation for bal.tab.mimids():

The distance measure generated by matchthem() or weightthem() is automatically included and named "distance" or "prop.score", respectively.

So you'll need to figure out what distance refers to in matchthem(). The matchthem() documentation says that the returned object is

the output of the calls to matchit() on each multiply imputed dataset.

So you need to know what the distance component is in a matchit object. The MatchIt documentation says the following:

distance: a vector of distance values (i.e., propensity scores) when distance is supplied as a method of estimating propensity scores or a numeric vector.

So that's your answer. It is the propensity scores that are estimated as part of the matching process. In this answer, I explain how to use it, and in this answer, I explain why it is called "distance" (i.e., because it is used to compute the distance between two units and doesn't have to be a propensity score).

You may feel like it is a bit extreme to make you go through three packages worth of documentation to understand this. My view is that you should be familiar with the documentation of all packages in order to use them. cobalt processes matchit and mimids objects, so you have to know what those objects are and what they contain to understand what cobalt does. matchthem() just calls matchit() a few times and returns the output in a clean list, so you have to understand what matchit() does and returns in order to understand what matchthem() is doing. It would be redundant to include documentation for each object in each package, but each package's documentation links to all the required documentation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.