Announcement

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

  • Error after -cem- command (coarsened exact matching)

    Hi all,

    Using Stata 17, I am trying to run coarsened exact matching commands (i.e., -cem-) introduced in this Stata Journal article: https://www.stata-journal.com/articl...article=st0176

    Please note that the article's data file cannot be opened using the suggested URL. I found this public data ( lalonde_data.dta ) somewhere on the net and attached it here.

    There are multiple troubles with this command. But the main issue is that after I run the following command (from the journal article):


    Code:
    cem age education black nodegree re74, treatment(treated)
    I get this error:

    cemStata(): 3001 expected 8 arguments but received 7
    <istmt>: - function returned error
    This issue is raised in an old thread: https://www.statalist.org/forums/for...lems-using-cem

    But, it is not clear how it is resolved. Does anyone know a way around this issue? Is there an official command for CEM in Stata? I hope Stata can solve this issue by adding a properly vetted command.

    Thanks,
    Navid

  • #2
    After installing version 1.4 (July 2020) it works:
    Code:
    . net from https://www.mattblackwell.org/files/stata
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    https://www.mattblackwell.org/files/stata/
    cem: Software for Coarsened Exact Matching
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Version 1.4.0 (July 27, 2020)
    
    Matthew Blackwell, Harvard University
    Stefano Iacus, University of Milan
    Gary King, Harvard University
    Giuseppe Porro, University of Trieste
    
    For a brief description of cem, type net describe cem
    To download documentation to your working directory, type net get cem
    To install cem program files, type type net install cem
    
    
    PACKAGES you could -net describe-:
        cem               Software for Coarsened Exact Matching
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    . use "C:\Users\scott\Desktop\test\lalonde_data.dta", clear
    (Written by R.              )
    
    . cem age education black nodegree re74, treatment(treated)
    
    Matching Summary:
    -----------------
    Number of strata: 205
    Number of matched strata: 67
    
                 0    1
          All  425  297
      Matched  324  228
    Unmatched  101   69
    
    
    Multivariate L1 distance: .46113967
    
    Univariate imbalance:
    
                     L1      mean       min       25%       50%       75%       max
          age    .13641   -.17634         0         0         0         0        -1
    education    .00687    .00687         0         0         0         0         0
        black   3.2e-16  -2.2e-16         0         0         0         0         0
     nodegree   5.8e-16   4.4e-16         0         0         0         0         0
         re74    .06787    34.438         0         0    492.23    39.425    96.881

    Comment


    • #3
      Thanks, Scott! This solved the problem.

      Comment

      Working...
      X