Programming the statistical procedures from SAS

Propensity Score Matching

Reply
N/A
Posts: 1

Propensity Score Matching

Hi all,

This is my first time working with Propensity Score Matching and I've been using the attached macro, which seems to work quite well, however I have a question regarding the %do %while procedure, as I don't understand why it keeps going in loops and it takes a really long time for the execution, so far it still hasn't finished. Is it supposed to make these loops? And take a very long time (3,5 hours+)?  I've marked with green in the attached document where the loops happen.

I would be really grateful for any help.

Thanks!

Grand Advisor
Posts: 10,043

Re: Propensity Score Matching

The %do %while, and the data step equivalent Do While are loop constructs. They are designed to run a group of steps until a condition is matched. In your specific macro until the macro variable __num is no longer greater than or equal to 1. Or for each record in one of the data sets it is doing a large number of operations. I'm not sure, but it looks like if there are never any matches it might not have an end. This could happen if the Match_Ratio target is set too large.

Ask a Question
Discussion stats
  • 1 reply
  • 312 views
  • 0 likes
  • 2 in conversation