Programming the statistical procedures from SAS

Propensity score matching

Regular Contributor
Posts: 180

Propensity score matching

Has anyone worked on Propensity score matching? ANy ideas how to go about it? I have never done that before. I use SAS.

Are there any macro programs available to do it?

Any help will be appreciated.


Regular Contributor
Posts: 180

Re: Propensity score matching

Posted in reply to Ashwini_uci

I want to use it for cross-sectional/observational type of study

Super User
Posts: 20,765

Re: Propensity score matching

Posted in reply to Ashwini_uci

There are a ton of papers on it and some macros if you search the term at

I think that the vmatch macro at mayo clinic does a good job, but there are others.

SAS and R: Example 7.35: Propensity score matching

Respected Advisor
Posts: 2,655

Re: Propensity score matching

I would also recommend reading some of Frank Harrell's comments on this in the MedStats Google Group.  My take away was that using covariates was much more powerful and more interpretable than propensity score matching.  One major problem with PS matching is the reduction in sample size ("unmatchable" subjects).

Steve Denham

Regular Contributor
Posts: 180

Re: Propensity score matching

Thanks Reeza!

I looked up the vmatch macro at the mayoclinic site. This is my only second time working on a macro and applying it to the data.

--Would you please try to explain to me the following in a simplified way?

--I am not sure how it is going to match the controls by one or more factors and how each cell indicates the distance.

--Also I am not able to follow how to arrange the data before applying the macro to it.

--Please see below the text from the macro.

In the purpose section of the Vmatch macro, following text appears,

Match cases to controls using variable optimal matching.

  | Replaces OPTIMAL matching option from %MATCH macro.

  | The vmatch macro matches each of N cases with a minimum of "a"  controls to a maximum of "b" controls from a total pool of M controls.

  | The vmatch macro uses the case-control "distance matrix" as input. This matrix has on row per case and on column per potential control. Each

  | cell entry is the distance, Dij, between the i-th case and the j-th  potential control. Output includes the assignments of cases to controls

  | and summaries of the matching efficacy. The "dist" macro can be used to calculate the distance matrix. Controls may be matched to cases by one or more factors(X's). With optimal matching, the control selected for a particular case will be the one closest to the case in terms of distance(Dij), subject to the goal of minimizing the total Dij over all cases.

And under the required parameters, its days following;


  | Name : dist

  | Default :

  | Type : Dataset Name

  | Purpose : Name of distance matrix(SAS dataset). Dist must include the case id as the first column and have only M

  | additional columns identifying the M potential controls. The value of the i-th row of the j-th control column is the distance from the i-th case to the j-th potential  control. It is recommended that no other variables be included.

Thanks much!


Ask a Question
Discussion stats
  • 4 replies
  • 3 in conversation