Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • kmatch: New command for multivariate-distance and propensity-score matching

    Thanks to Kit Baum, a new package called kmatch is available from the SSC Archive. To install the package, type:
    Code:
    . ssc install kmatch
    kmatch matches treated and untreated observations with respect to covariates and, if outcome variables are provided, estimates treatment effects based on the matched observations, optionally including regression adjustment bias-correction. Multivariate (Mahalanobis) distance matching as well as propensity score matching is supported, either using kernel matching, ridge matching, or nearest-neighbor matching. For kernel and ridge matching, several methods for data-driven bandwidth selection such as cross-validation are offered. The package also includes various commands for evaluating balancing and common-support violations.
    ben

  • #2
    An update to kmatch is now available from the SSC-Archive. To install the update, type
    Code:
    . ssc install kmatch, replace
    or use the adoupdate command. Main changes are as follows:
    - there is a new option sharedbwidth that causes the same bandwidth to be used for matching the treated and for matching the untreated
    - there was a bug in the outcome-cross-validation bandwidth search algorithm that could cause results to be off (and unstable) if the data contained ties; this is fixed
    - bandwidth search with fweights did not provide the same results as bandwidth search on the expanded data; this is fixed
    - kmatch md crashed if no covariates were specified; this is fixed
    - kmatch md crashed if the outcome-cross-validation bandwidth search algorithm was used with weights; this is fixed
    - the no-outcome-cross-validation bandwidth search algorithm in kmatch md now uses the standardized and orthogonalized covariates instead of the original covariates
    - kmatch md now slightly increases the bandwidth when searching for possible matches to take account of possible roundoff error
    - the pariwise-matching bandwidth search algorithm now takes account of weights when computing quantiles of the minimum distance distribution
    - bandwidth search is now skipped if no covariates are specified
    - kmatch cvplot did not always connect the data points correctly; this is fixed
    - options noatt and noatc of kmatch cvplot have been renamed to notreated and nountreated
    - several details about how results are displayed and stored have been changed
    ben

    Comment


    • #3
      Another update to kmatch is available from SSC. Type ssc install kmatch, replace to install the update or use the adoupdate command.

      Main changes:
      - computational speed has been improved by handling ties more efficiently
      - bwidth(pm) now ignores zero distances when determining quantiles; the default quantile has been changed from 0.95 to 0.9
      - bw(cv ..., weighted) had a bug so that wrong weights were used; this is fixed
      - bwidth(cv ...) now tries to prevent excessively large bandwidths; suboption nolimit deactivates this behavior
      - in case of fweights, the frequency weights were included in the matching weights stored by the generate option; this has been changed; the weights are now the same as they would be in the expanded data
      - kmatch csummmarize did not account for weights when computing statistics for the unmatched; this is fixed
      - kmatch csummarize had a wrong label in the rightmost column of the variance table; this is fixed
      - kmatch density, kmatch cdensity, and kmatch cbox did not always include labels for the variables; this is fixed
      - results from kmatch ps, nn(1) were not always exactly equal to the results from teffects psmatch, nn(1) due to a minor bug; this is fixed

      ben

      Comment


      • #4
        Hi Ben,

        I'm using your command to estimate the MDM DID estimator and have a question.

        Here's what I'm doing:

        kmatch md trmt x1 x2 x3 x4, gen
        And I got the matching weights and use that to calculate my weights. My question is, "what is the natural of _KM_mw?" I mean, what is _KM_mw when I use md option?

        Thank you for your time!

        Comment


        • #5
          Like any other matching estimator, md matching can be rewritten as a weighting estimator. _KM_mw contains the weights implied by the matching. Here's an example illustrating that you get the same point estimate for the ATE using the weights stored by kmatch:

          Code:
          sysuse nlsw88, clear
          kmatch md union age married grade south smsa (wage), gen
          regress wage union [pw=(_KM_nc!=0)+_KM_mw]
          _KM_mw cantains "raw" weights that need some modification (e.g. as in the example), depending on context. There is also option wgenerate() to store ready-to-use weights; see the corresponding section in the helpfile.
          ben

          Comment

          Working...
          X