Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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