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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1568 views
  • 0 likes
  • 2 in conversation