BookmarkSubscribeRSS Feed
SigAnn
Calcite | Level 5

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!

1 REPLY 1
ballardw
Super User

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1580 views
  • 0 likes
  • 2 in conversation