%CEM Macro for SAS: how to invoke this macro

Viewed 59

I am trying to use %CEM Macro for SAS to perform coarsened exact matching(Paolo Berta, Matteo Bossi & Stefano Verzillo). I wrote the following commands but I cannot invoke this macro. Can anyone help what I did wrong? I do not know whether it need more lines of code prior to this macro.

523  %CEM (

     -
     180

WARNING: Apparent invocation of macro CEM not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.


524        lib = work,

525        dataset = L1_redu,

526        id = uniqueDRCstudentID,

527        treat = treat,

528        keep = LSS H I A B P W,

529        del_miss = 0,

530        match_type=N,

531        method = Sturges,

532        path_graph = N:\mydrive 

533        report = on

534  )

1 Answers

It looks like you have copied/pasted from a log to try and run it and it's including log lines. You need to download and compile the macro first, then call %cem(). For example, if you download it and save it to the C: drive:

%include "C:\macro_cem_updated_new_feb17.sas";

%cem(<arguments go here>);
Related